Wednesday, 2 August 2017

stm32 - STM32F103 strange behavior


I'm working with an STM32F103 device and am experiencing some strange behavior that I'm not so sure about where start with when it comes to debugging it. I previously asked a question regarding DMA problems with this device that I never quiet resolved. I've come back to look at this, but now suspect my DMA problems are related to something else. I'm working on a custom board that, at the moment is just the STM32F103 device connected over SPI to an STM32F405 discovery board. SPI works fine in polling mode and now I'm attempting to get SPI and DMA working again. My problem is that I can get it work intermittently but it seems to be dependent on initialisation of variables. For example, I can get SPI working with DMA well if I initialise some variable in my main() function. EG:



int main(void) {
uint32_t spiBase = 0;
// etc, etc
}

However, if I then initialise another variable under this one DMA will stop working. I'm really at a bit of a loss on how to go about debugging a problem like this! Currently, I'm using the arm-none-eabi-gcc compiler with a Makefile I grabbed and modified that was originally intended for STM32F405 devices (from here: (http://liviube.wordpress.com/2013/04/22/blink-for-stm32f4-discovery-board-on-linux-with-makefile/), along with Texane's st-link utility. It is entirely probable that my Makefile or linker configuration is a bit screwy! Can anyone offer any advise on where I might start with strange problems like this?!




No comments:

Post a Comment

arduino - Can I use TI's cc2541 BLE as micro controller to perform operations/ processing instead of ATmega328P AU to save cost?

I am using arduino pro mini (which contains Atmega328p AU ) along with cc2541(HM-10) to process and transfer data over BLE to smartphone. I...