Interestingly, if
#define CH_DBG_SYSTEM_STATE_CHECK TRUE
SV # 4 happens during initialization tasks "lwip_thread", and if
#define CH_DBG_SYSTEM_STATE_CHECK FALSE
see the situation described above (a few pings).
CH_DBG_SYSTEM_STATE_CHECK and CH_DBG_ENABLE_ASSERTS allows you to abort program flow ...
Search found 35 matches
- Thu Jan 29, 2015 9:03 am
- Forum: STM32 Support
- Topic: STM324Discovery+LAN8720
- Replies: 10
- Views: 8164
- Mon Jan 19, 2015 7:52 am
- Forum: General Support
- Topic: FATS f_getfree 0 clusters
- Replies: 12
- Views: 13589
Re: FATS f_getfree 0 clusters
Looping won't help.
sdcStart(&SDCD1, NULL);
if( sdcConnect(SDCDriver *sdcp) == CH_SUCCESS ){
FRESULT res = f_mount(&SDC_FS, "0:", 1);
if(res == FR_OK ){
chprintf(chp, "mounted succesfully\n");
}else{
chprintf(chp, "mounting failed\n");
}
}else{
chprintf(chp, "sdcConnect failed\n");
}
What ...
sdcStart(&SDCD1, NULL);
if( sdcConnect(SDCDriver *sdcp) == CH_SUCCESS ){
FRESULT res = f_mount(&SDC_FS, "0:", 1);
if(res == FR_OK ){
chprintf(chp, "mounted succesfully\n");
}else{
chprintf(chp, "mounting failed\n");
}
}else{
chprintf(chp, "sdcConnect failed\n");
}
What ...
- Fri Jan 16, 2015 7:45 am
- Forum: General Support
- Topic: FATS f_getfree 0 clusters
- Replies: 12
- Views: 13589
Re: FATS f_getfree 0 clusters
I've looked into Chibios used here. (2.6)
But it seems you can only use the fatfs bindings with the SDCDriver, or the MMCDriver. Not Serial, not SPI.
Typically there is no pullup on the clk line. m (the transistor is optional, to be able to turn off the card)
Also, the EMI filters in the image ...
But it seems you can only use the fatfs bindings with the SDCDriver, or the MMCDriver. Not Serial, not SPI.
Typically there is no pullup on the clk line. m (the transistor is optional, to be able to turn off the card)
Also, the EMI filters in the image ...
- Tue Jan 13, 2015 12:40 pm
- Forum: STM32 Support
- Topic: How to disable interrupts?
- Replies: 8
- Views: 8723
Re: How to disable interrupts?
They are the docs of the cortex m4. However, the m0 is equal in he basics. The m4 has some more advanced instructions. I guess (do not know for sure) the interrupt model is equal.
You linked me to the "ARM-V7" port page. I have a cortex M0. People who already know such a thing think it is obvious ...
You linked me to the "ARM-V7" port page. I have a cortex M0. People who already know such a thing think it is obvious ...
- Mon Jan 12, 2015 9:24 am
- Forum: General Support
- Topic: FATS f_getfree 0 clusters
- Replies: 12
- Views: 13589
Re: FATS f_getfree 0 clusters
FATFS* fs;
f_getfree("0:", &freeClusters, &fs);
Works fine here. But, you'd need to call sdcStart, sdcConnect and f_mount (successfully) before f_getfree works.
You say you have an 8mb card, don't you mean 8 GB? If so, you're doing undefined stuff because the maximum size is 4 GB. Make sure ...
- Mon Jan 12, 2015 7:48 am
- Forum: STM32 Support
- Topic: How to disable interrupts?
- Replies: 8
- Views: 8723
Re: How to disable interrupts?
chSysLock -> port_lock ->
register uint32_t basepri __asm("basepri");
basepri = CORTEX_BASEPRI_KERNEL;
Does not explicitly disable all interrupts on STM32. It elevates the current interrupt priority mask to some level.
If compiled with CORTEX_SIMPLIFIED_PRIORITY it will be __disable_irq ...
register uint32_t basepri __asm("basepri");
basepri = CORTEX_BASEPRI_KERNEL;
Does not explicitly disable all interrupts on STM32. It elevates the current interrupt priority mask to some level.
If compiled with CORTEX_SIMPLIFIED_PRIORITY it will be __disable_irq ...
- Mon Dec 15, 2014 1:24 pm
- Forum: STM32 Support
- Topic: Chibios and FATFS SDHC support
- Replies: 19
- Views: 13520
Re: Chibios and FATFS SDHC support
Meanwhile, I can confirm writing and reading from an 8GB SanDisk SDHC card works*.
However, getting metadata doesn't. It won't read the filesize correctly anymore. It does with a FILINFO.
It seems after f_open, the fsize isn't being set correctly if the file is beyond 4 GB.
However, getting metadata doesn't. It won't read the filesize correctly anymore. It does with a FILINFO.
It seems after f_open, the fsize isn't being set correctly if the file is beyond 4 GB.
- Fri Dec 12, 2014 2:21 pm
- Forum: General Support
- Topic: Stack leak detection
- Replies: 6
- Views: 5235
Re: Stack leak detection
MSTACK is indeed the first piece or memory to be allocated to the beginning of the coupled memory.
Didn't thought of it that way.
Currently I've set it to 512 bytes. That would be enough to fit two interrupt routines, assuming they to not throw an exception.
I'll set it back to 4kB, which is ...
Didn't thought of it that way.
Currently I've set it to 512 bytes. That would be enough to fit two interrupt routines, assuming they to not throw an exception.
I'll set it back to 4kB, which is ...
- Fri Dec 12, 2014 1:24 pm
- Forum: General Support
- Topic: Stack leak detection
- Replies: 6
- Views: 5235
Re: Stack leak detection
That makes sense.
But what is preventing interrupts from running out of stack?
Should the stack size fit all enabled interrupts?
But what is preventing interrupts from running out of stack?
Should the stack size fit all enabled interrupts?
- Thu Dec 11, 2014 1:08 pm
- Forum: General Support
- Topic: Stack leak detection
- Replies: 6
- Views: 5235
Re: Stack leak detection
Ah, I see it sets basepri to 0x20 in chSysLockFromIsr()...
And if I'm not mistaken this allows nested interrupts for the kernel and not the HAL.
Can I find a list of preemptable interrupts?
Usually I am not going this low level in arm.
And if I'm not mistaken this allows nested interrupts for the kernel and not the HAL.
Can I find a list of preemptable interrupts?
Usually I am not going this low level in arm.