Even if the FAT_SHELL.C sample works flawlessly (the SD card has two 2GB FAT16
partitions) the function "sspec_automount(SSPEC_MOUNT_ANY, ..." returns "2" at
the beginning of the "main" in my project.
The problem arises exactly here:
https://github.com/digidotcom/DCRabbit_10/blob/master/Lib/Rabbit4000/SDflash/SDFLASH.LIB#L993
https://github.com/digidotcom/DCRabbit_10/blob/master/Lib/Rabbit4000/SDflash/SDFLASH.LIB#L993
At the second iteration (j=1) cmd_reply.reply == 5.
This strange behavior occurs only in debug, and does not occur if I run
FAT_SHELL.C right before compiling and executing my code.
For now it's just a little annoying, but I'm posting it anyway: maybe
someone has a clue about the possible cause.
Strange FAT auto-mount behavior | RCM4300 | DC 10.72D (debug mode) | 4GB SDHC
Started by ●March 27, 2019
Reply by ●April 9, 20192019-04-09
Hmmm. This is interesting. It could be a timing issue of some sort.
If cmd_reply.reply is 5, that would somehow indicate (R1_ILLEGAL_COMMAND | R1_IDLE_STATE). We could alter the previous check to see if the R1_IDLE_STATE bit is set, but then we’d be ignore the error.
I’m not clear on why it’s triggering R1_ILLEGAL_COMMAND.
I assume you’ve enabled SDFLASH_SDHC because of the size of your SD card. Are you seeing cmd8_success in the first half of that function?
There could be some issue with the SPI lines going to the SD card and not resetting the card properly when starting up in debug mode.
-Tom
> On Mar 27, 2019, at 6:03 AM, t...@gmail.com [rabbit-semi] wrote:
>
> Even if the FAT_SHELL.C sample works flawlessly (the SD card has two 2GB FAT16 partitions) the function "sspec_automount(SSPEC_MOUNT_ANY, ..." returns "2" at the beginning of the "main" in my project.
> The problem arises exactly here: https://github.com/digidotcom/DCRabbit_10/blob/master/Lib/Rabbit4000/SDflash/SDFLASH.LIB#L993 At the second iteration (j=1) cmd_reply.reply == 5.
>
> This strange behavior occurs only in debug, and does not occur if I run FAT_SHELL.C right before compiling and executing my code.
>
> For now it's just a little annoying, but I'm posting it anyway: maybe someone has a clue about the possible cause.
If cmd_reply.reply is 5, that would somehow indicate (R1_ILLEGAL_COMMAND | R1_IDLE_STATE). We could alter the previous check to see if the R1_IDLE_STATE bit is set, but then we’d be ignore the error.
I’m not clear on why it’s triggering R1_ILLEGAL_COMMAND.
I assume you’ve enabled SDFLASH_SDHC because of the size of your SD card. Are you seeing cmd8_success in the first half of that function?
There could be some issue with the SPI lines going to the SD card and not resetting the card properly when starting up in debug mode.
-Tom
> On Mar 27, 2019, at 6:03 AM, t...@gmail.com [rabbit-semi] wrote:
>
> Even if the FAT_SHELL.C sample works flawlessly (the SD card has two 2GB FAT16 partitions) the function "sspec_automount(SSPEC_MOUNT_ANY, ..." returns "2" at the beginning of the "main" in my project.
> The problem arises exactly here: https://github.com/digidotcom/DCRabbit_10/blob/master/Lib/Rabbit4000/SDflash/SDFLASH.LIB#L993 At the second iteration (j=1) cmd_reply.reply == 5.
>
> This strange behavior occurs only in debug, and does not occur if I run FAT_SHELL.C right before compiling and executing my code.
>
> For now it's just a little annoying, but I'm posting it anyway: maybe someone has a clue about the possible cause.
Reply by ●April 10, 20192019-04-10