mirror of
https://github.com/cesanta/mongoose.git
synced 2024-12-18 11:28:13 +08:00
Merge pull request #2448 from cesanta/fixh743f
Fix H743 FreeRTOS early SysTick crash
This commit is contained in:
commit
129bf93b30
@ -35,4 +35,4 @@
|
||||
|
||||
#define vPortSVCHandler SVC_Handler
|
||||
#define xPortPendSVHandler PendSV_Handler
|
||||
#define xPortSysTickHandler SysTick_Handler
|
||||
//#define xPortSysTickHandler SysTick_Handler
|
||||
|
@ -7,6 +7,13 @@
|
||||
|
||||
#define BLINK_PERIOD_MS 1000 // LED blinking period in millis
|
||||
|
||||
// workaround SysTick firing before FreeRTOS has fully initialized (startup)
|
||||
extern void xPortSysTickHandler(void);
|
||||
void SysTick_Handler(void) {
|
||||
if (xTaskGetSchedulerState() != taskSCHEDULER_NOT_STARTED)
|
||||
xPortSysTickHandler();
|
||||
}
|
||||
|
||||
void mg_random(void *buf, size_t len) { // Use on-board RNG
|
||||
for (size_t n = 0; n < len; n += sizeof(uint32_t)) {
|
||||
uint32_t r = rng_read();
|
||||
|
Loading…
Reference in New Issue
Block a user