Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
7 years, 7 months ago.
Clash in libraries
Hi,
I am running the exact same code on the same dev board, a NUCLEO-STM32L053. In this code I am writing stuff out via SPI (PB6, PB5 and PB3) and also sampling a singla via the internal mcu ADC, on pin PC0.
The problem is that with one version of the code, I am running the latest version of the mbed.h libraries containing all Structs, Classes and Groups, and there the SPI does not work but the sampling does. Whilst with an earlier version, that only has the Classes in it, the SPI works but the ADC does not.
Could anyone please give me any suggestions on how to proceed?
/media/uploads/Osairiis/main.cpp
Thanks !
Question relating to:
1 Answer
7 years, 7 months ago.
Can you post up some code that you're having trouble with?
Code looks sane so it's time to get out the logic analyzer :( But before going that far, I had a problem when writing to SPI on a different chip and the fix was to add some delay between the chip select high/low and the SPI command. Here's a sample change....see if it makes any difference. If not then it's going to be more of a bit-level analysis to make sure you're fully meeting the Analog Devices timing/data requirements.
Also, you don't need to add all those includes, just "mbed.h" is sufficient.
posted by Bill Bellis 04 May 2017