This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#10669 - AMS Sansa Reimplement Voltage Scaling
Attached to Project:
Rockbox
Opened by Jack Halpin (FlynDice) - Saturday, 10 October 2009, 05:12 GMT+2
Last edited by Jack Halpin (FlynDice) - Thursday, 15 October 2009, 21:58 GMT+2
Opened by Jack Halpin (FlynDice) - Saturday, 10 October 2009, 05:12 GMT+2
Last edited by Jack Halpin (FlynDice) - Thursday, 15 October 2009, 21:58 GMT+2
|
DetailsThis patch reimplements voltage scaling for the AMS Sansas. I have set the reduced voltage level at 1.05 V in the hope that the lower voltage will be more likely to expose any bugs that may show up. When actually implemented I would expect to use 1.10 as the reduced voltage. kugel and mc2739 came up with this solution several month ago I have simply massaged the implementation here a bit.
This patch uses cpu_boost() during sd card accesses when a microsd is present to raise the core voltage back to 1.20V. This means that for the clip, and also for the other targets when a microsd card is not present, it does not use cpu_boost() on card access and remains at the lower voltage. I have run this at 1.05 on my e280v2 for several hours now both with and without a microsd with no problems. |
This task depends upon
Closed by Jack Halpin (FlynDice)
Thursday, 15 October 2009, 21:58 GMT+2
Reason for closing: Accepted
Additional comments about closing: r23193
Thursday, 15 October 2009, 21:58 GMT+2
Reason for closing: Accepted
Additional comments about closing: r23193
Undefined instruction
at: 30800CF8
Side note, the the previous patch at 1.10v worked okay. I have an 8 GB class 2 Sandisk SDHC on an e260V2.
The Fuze deadlocks when I remove the µSDHC (Transcend 4GB Class 6)
I do not know how long before you drop the voltage back to the 1.05 after card insertion, maybe this coincides with the error. I have tried this with another 8 GB Sandisk Class 2 SDHC card this one with different disk info in the debug menu and very much the same results.
The voltage is still at 1.05 but is easily changed to 1.10. If 1.05 gives you problems try changing line 370 in system-as3525 from CVDD_1_05 to CVDD_1_10.
Edit: I have noticed some blue pixels that I didn't see before applying this patch. They show up consistently on the Rockbox logo displayed by the main firmware (not bootloader). They are about half way down the display in one line. This is with r23123. I do not see them with a clean build.
Edit 2: I have reapplied the first patch with r23123 and do not see the blue pixels.
I am puzzled why the first patch would not exhibit the same problem as it is basically the same process with a check to see if there is a card present.
And no, I am not doubting your results as you are the ultimate tester!
Does raising the voltage to 1.10 have any effect?
It does check for the presence of a µSD card to boost, a much better way than the first patch, so if you don't have a µSD card installed, it should not boost.
I think this one is ready to commit if we don't see any problems.
No problems reading, writing, deleting, inserting, removing or playback on µSD card. No display anomalies.
I saw a freeze when removing the µSD while buffering, however I didn't test if the same freeze happen without this patch.
Removing µSD when idle or when audio has been buffered shows no problem
EDIT: I see you unboost unconditionally and this might be a problem since the counter could become negative
The way i read cpu_boost(bool on_off) in system.c there is a safety check to reset the boost counter to 0 if it goes negative.
I will modify the config files and post another patch shortly.
It should be possible to check for boosting state during SD removal with not much trouble
I've edited the config files for e200v2, fuze, clip, and c200v2 to activate voltage scaling.
I tested removing the card while buffering and got lockups with both current svn and this patch so I am pretty sure this patch does not impact that issue.
If all as3525 models use this, then I think this should be hardcoded (EDIT: I mean remove the ADJUST_CPU_VOLTAGE define)
The patch doesn't deal with µSD removal when an operation is in progress, but since this locks up the Sansa anyway I think you should just commit when you feel it's alright.
- Make CPU boosting depend on HAVE_MULTIDRIVE (unneeded for internal storage)
- Keep track of boosting status inside sd_enable() so we don't need to check for card removal
EDIT: tested on Fuze & Clip , battery_bench running on both
cpu_boosted seems to take care of the card removal problem for us just fine....
But perhaps it should be conditional on HOTSWAP.
By the way the various
#if defined(SANSA_E200V2) || defined(SANSA_FUZE) || defined(SANSA_C200V2)
should be removed since they always are enclosed on MULTIDRIVE or HOTSWAP.
And I think most if not all the MULTIDRIVE should be changed to HOTSWAP (which means hotswappable µSD cards)
Because MULTIDRIVE could be true when using a ramdisk for example
My comments were addressed in r23180
The clip freezed at playback though
No need to wait, please commit