Search found 9 matches
- Mon Aug 03, 2020 9:21 pm
- Forum: STM32 Support
- Topic: I2C transfer of large data (10kb +) crashes chibios
- Replies: 14
- Views: 9304
Re: I2C transfer of large data (10kb +) crashes chibios
❯ arm-none-eabi-gcc --version
arm-none-eabi-gcc (GNU Arm Embedded Toolchain 9-2020-q2-update) 9.3.1 20200408 (release)
❯ git st
## stable_20.3.x...origin/stable_20.3.x
❯ git rev-parse HEAD
5f523dc8e95d7ff6c6daf3bc41531cae7285cbdf
However it seems I fixed the ...
- Mon Aug 03, 2020 7:45 pm
- Forum: STM32 Support
- Topic: I2C transfer of large data (10kb +) crashes chibios
- Replies: 14
- Views: 9304
Re: I2C transfer of large data (10kb +) crashes chibios
Giovanni,
I guess I was a little premature here - it works fine with -O0 only.
Once I enable either -O1 or -O2 it fails again with the unhandled exception, even with FPU disabled.
So back to the stacksize issue. I'll keep you posted if I find anything concrete. First time debugging issues when ...
I guess I was a little premature here - it works fine with -O0 only.
Once I enable either -O1 or -O2 it fails again with the unhandled exception, even with FPU disabled.
So back to the stacksize issue. I'll keep you posted if I find anything concrete. First time debugging issues when ...
- Mon Aug 03, 2020 3:56 pm
- Forum: STM32 Support
- Topic: I2C transfer of large data (10kb +) crashes chibios
- Replies: 14
- Views: 9304
Re: I2C transfer of large data (10kb +) crashes chibios
Giovanni,
thank you so much for your help.
It turns out that the issue is inside my Makefile: I had set; once I disabled it it all started working.
I'm not 100% sure why the FPU would break an I2C transaction, but I'm glad that it works when I disable it.
thank you so much for your help.
It turns out that the issue is inside my Makefile: I had
Code: Select all
USE_FPU=hardI'm not 100% sure why the FPU would break an I2C transaction, but I'm glad that it works when I disable it.
- Mon Aug 03, 2020 6:20 am
- Forum: STM32 Support
- Topic: I2C transfer of large data (10kb +) crashes chibios
- Replies: 14
- Views: 9304
Re: I2C transfer of large data (10kb +) crashes chibios
Downgrading didn't change anything. But maybe the UFSR holds an answer: per gdb the value is 0x4:
(gdb) print/x *(uint32_t *) 0xE000ED2A
$4 = 0x4
Which per online documentation means:
- NOCP - Indicates that a Cortex-M coprocessor instruction was issued but the coprocessor was disabled or not ...
(gdb) print/x *(uint32_t *) 0xE000ED2A
$4 = 0x4
Which per online documentation means:
- NOCP - Indicates that a Cortex-M coprocessor instruction was issued but the coprocessor was disabled or not ...
- Mon Aug 03, 2020 1:01 am
- Forum: STM32 Support
- Topic: I2C transfer of large data (10kb +) crashes chibios
- Replies: 14
- Views: 9304
Re: I2C transfer of large data (10kb +) crashes chibios
So I ended up pulling in the exceptionvectors.c from [this thread](http://www.chibios.com/forum/viewtopic.php?t=2506).
HardFault_Handler exceptionvectors.c:63
<signal handler called> 0x00000000ffffffed
<unknown> 0x000000000000000a
Signal = SIGTRAP (Trace/breakpoint trap ...
HardFault_Handler exceptionvectors.c:63
<signal handler called> 0x00000000ffffffed
<unknown> 0x000000000000000a
Signal = SIGTRAP (Trace/breakpoint trap ...
- Sun Aug 02, 2020 11:41 pm
- Forum: STM32 Support
- Topic: I2C transfer of large data (10kb +) crashes chibios
- Replies: 14
- Views: 9304
Re: I2C transfer of large data (10kb +) crashes chibios
I'm not sure I understand how the thread stacks should be involved here.
I disabled the idle main thread and this is executed directly inside main .
The data being transfered via i2c is declared as static const uint8_t build_stm32g031k8_bin[] outside of main, so I'd expect it to be static ...
I disabled the idle main thread and this is executed directly inside main .
The data being transfered via i2c is declared as static const uint8_t build_stm32g031k8_bin[] outside of main, so I'd expect it to be static ...
- Sun Aug 02, 2020 9:13 pm
- Forum: STM32 Support
- Topic: I2C transfer of large data (10kb +) crashes chibios
- Replies: 14
- Views: 9304
Re: I2C transfer of large data (10kb +) crashes chibios
So I got my debugger replacement - it seems that chibios experiences a stack overflow, but not when sending the huge amount of data; it's experiencing it when sending 2 byte command before the actual transmission.
Here's the stack trace:
chSysHalt chsys.c:205
chSchGoSleepS chschd.c ...
Here's the stack trace:
chSysHalt chsys.c:205
chSchGoSleepS chschd.c ...
- Fri Jul 31, 2020 7:24 pm
- Forum: STM32 Support
- Topic: I2C transfer of large data (10kb +) crashes chibios
- Replies: 14
- Views: 9304
Re: I2C transfer of large data (10kb +) crashes chibios
Hey Giovanni,
thanks for the suggestion. I have debugging enabled, however my STLink V2 died some days ago and I'm still waiting on the replacment.
Is there any way to transmit this information from the STM32F303 without having a debug probe attached?
Best,
Raphael
thanks for the suggestion. I have debugging enabled, however my STLink V2 died some days ago and I'm still waiting on the replacment.
Is there any way to transmit this information from the STM32F303 without having a debug probe attached?
Best,
Raphael
- Fri Jul 31, 2020 7:09 pm
- Forum: STM32 Support
- Topic: I2C transfer of large data (10kb +) crashes chibios
- Replies: 14
- Views: 9304
I2C transfer of large data (10kb +) crashes chibios
Hey,
I've migrated the stm32_write_memory procedure from [stm32flash project](m) to work with chibios. The change itself is pretty straight forward: changing the i2c interactions to call i2cMasterTransmitTimeout and i2cMasterReceiveTimeout .
Now when I use chibios to remote-flash an example ...
I've migrated the stm32_write_memory procedure from [stm32flash project](m) to work with chibios. The change itself is pretty straight forward: changing the i2c interactions to call i2cMasterTransmitTimeout and i2cMasterReceiveTimeout .
Now when I use chibios to remote-flash an example ...