ADC Performance During Flash Write

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
BrCo_4643431
Level 1
Level 1

Hello,

I have noticed a problem with ADC accuracy during a write to flash. I have the CM0+ executing a partially-blocking flash write. The CM4, meanwhile, is sampling an input signal at a constant rate. During the flash write the sampling seems to have one or two incorrect samples. I suspect it could be a power supply problem, as the ADC is referenced to the 3V3 VDD rail. Has anyone had issues with using these two features at the same time?

Platform: PSoC 6 BLE Prototyping Kit powered via USB by a laptop

0 Likes
5 Replies
Vasanth
Moderator
Moderator
Moderator
250 sign-ins 500 solutions authored First question asked

Hi ,

By how much the results are off ? Could you provide more information about your settings ? The ADC configuration( input pins, acquisition time) all those details? Also set us know how the how you are updating flash ?

Best Regards,
Vasanth

0 Likes

Here is a chart of ADC samples during a flash write. The flash write occurs right when the spike in the graph happens:

adc.png

The ADC is configured in single-shot mode. A clock triggers a flip-flop which triggers an interrupt. The interrupt handler calls Cy_SAR_StartConvert(). The sampling rate from this set up is 2160hz. The ADC is configured for one single ended input with an achieved acquisition time of 560ns and no averaging. Vref is selected to be Vdda/2 and Vneg is set to be Vref. See screenshots below of the configuration.

Capture.PNG

The pin selected for the input is 10[0] if that makes any difference.

Thanks for your help.

-Brian

0 Likes

I forgot to add details about flash. I am calling CyFlash_StartWrite() and then polling Cy_Flash_IsOperationComplete() until the operation is finished. This is happening on the CM0+, while all the sampling stuff is happening on the CM4. I have moved the location of this flash write to several different sectors, all with the same result.

Best,

Brian

0 Likes

What happens if you change the Vref select option from VDDA/2 to System bandgap?  Reduce the voltage range of the input signal appropriately.

0 Likes

I had similar results using the system bandgap as the reference.

0 Likes