fatfs busy wait? is this a known issue? (false alarm - please ignore) Topic is solved

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderator: RoccoMarco

Post Reply
User avatar
russian
Posts: 368
Joined: Mon Oct 29, 2012 3:17 am
Has thanked: 16 times
Been thanked: 14 times

fatfs busy wait? is this a known issue? (false alarm - please ignore)

Post by russian »

I have two threads in my application - one is blinking an LED with constant period just to show how my firmware is alive, another thread is constantly trying to mount an SD card via MMC/spi and write log to said card. stm32f4discovery. ChibiOS 2.8.something.

my problem is that if I insert said SD card I do get the log files properly written, but I am loosing the blinking LED - the blinks are becoming pretty sporadic, totally not even. While the LED is just the most obvious thing I am loosing, I am also loosing TTL console and pretty much everything.

I've hit 'break' under debugger 10 times and 8/10 times the stack trace is the same - attached picture.

Code: Select all

#define rtc_lld_apb1_sync() {                                                \
    int counter = 0;                                                         \
   while ((RTCD1.id_rtc->ISR & RTC_ISR_RSF) == 0 && ++counter <LSE_TIMEOUT);\
   }


is this an issue? is this a known issue? is this improved in newer branches by any chance?
Attachments
screenshot.png
screenshot.png (3.1 KiB) Viewed 2115 times
User avatar
russian
Posts: 368
Joined: Mon Oct 29, 2012 3:17 am
Has thanked: 16 times
Been thanked: 14 times

Re: fatfs busy wait? is this a known issue? (false alarm - please ignore)

Post by russian »

I am sorry, I am sorry - that's actually about waiting for LSE while LSE is not there. It would be cool if LSE/no LSE would become a dynamic choice so that the same compiled binary would be running properly with and without the 32kHz crystal.

Once again, sorry - false alarm, there is no issue here.
Post Reply