Hello,
My microcontroller is STM32F103CBT6. I have the following problem. I can't make SPI work with callback. I took "testhal\STM32F1xx\SPI" example and replaced NULL in configuration structure with my callback and replaced spiExchange() with spiStartReceive() routine with no result. Is there anything else I should change in order to use callback?
I tried stable_2.4.x and stable_2.6.x head Chibios versions from GitHub repository. I can't check it in stable_3.0.x because due to some reason debugger doesn't see source code for the resulting ELF file. So I can't debug it. Options string I used is the following: "USE_OPT = -O0 -g -ggdb -fomit-frame-pointer -falign-functions=16". For 2.4.x and 2.6.x it worked well.
I would appreciate any advice very much!
Using SPI with callback on STM32F103
Moderator: RoccoMarco
- Giovanni
- Site Admin
- Posts: 14892
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: Using SPI with callback on STM32F103
Hi,
It should work or the driver would not work at all even without callbacks.
Are you using ChibiStudio or some other toolchain? I have no trouble debugging 3.0.
Giovanni
It should work or the driver would not work at all even without callbacks.
Are you using ChibiStudio or some other toolchain? I have no trouble debugging 3.0.
Giovanni
Re: Using SPI with callback on STM32F103
I'm sorry, it seems to me I've found the problem. That's pure IDE problem. Due to some reason breakpoint in callback routine doesn't trigger. I changed it to LED toggling. And I see it's blinking.