SPI is not working after ADC Operation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-12-03 12:28 AM
Hello,
We are using STM32F2XX with ADC and external SPI Flash.
In our code, there are running two threads one for ADC operation and another for Flash read write operation.
We can easily use our External flash through SPI2 and ADC operation individually.
But Once, we run both operation simultaneously at that time we can not read and write to the Flash.
In our observation, We notice that before the ADC Operation we are able to use Flash over SPI. but once ADC operation happened after that we can not able to read or write to the Flash.
Also trying to reinitialize the Flash after ADC Operation, but it gives SPI Error.
Please help us regarding this if you have any suggestion or solution.
Thanks in advance,
Regards,
Darpan
- Labels:
-
ADC
-
SPI
-
STM32F2 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-12-03 1:32 AM
Cube/HAL based ?
Present the associated code, especially interrupt handlers and callbacks.
I suppose you spent far too much time in interrupt context (callbacks), and get overruns.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-12-04 2:37 AM
Thanks Ozone,
Issue is just fixed. it is some configuration and SPI_CLK issue for Flash. It is something differ than we assume.
Thanks again,
Darpan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-12-04 3:41 AM
Well, that is a different thing.
Serial communication with external devices need to be validated separately, with at least checking for a reference output (like the WHO_AM_I register of many I2C devices), or using a scope.
