cancel
Showing results for 
Search instead for 
Did you mean: 

SPI is not working after ADC Operation

DPate.9
Associate

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

3 REPLIES 3
Ozone
Lead

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.

DPate.9
Associate

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

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.