Closed Gregwar closed 9 years ago
Looks like the uC doesn't freeze if I disable uarts before doing my operations and enable it again just after I understand that a flash operation would stall the uC for like 20ms anyway, making me loose bytes on the uart. But I don't understand why it hangs forever.
I have no idea. Perhaps bus contention oddness?
What happens if you put nop or WFI in the loop instead of a hard spin? (Unless you've turned it off, SysTick will wake you up if you go WFI).
I've tried a lot of things, and it looks like there is a relation with the usart handling One of the possibilities is that thr usart interrupt occur at some point for another reason than rx data Looks like checking the RXNE bit in the SR usart registers before appending data to the rb prevents hanging
e1314f6466102 just got merged, which might fix that. Can you try with today's master?
Actually, this is what I did I've also moved the uart interruption to the ram section
OK, so is today's master working for you? I'll close if so.
Yes, I confirm it's ok
Hello,
I'm working on an application where I need to change the flash. So, I erase pages and write bytes on-the-fly.
This is the erase page part:
When there is serial data incoming in the same time, this results in a complete freeze of the chip just after starting the erasing.
Any idea why?