BLE data to DAC output | Cypress Semiconductor
August 17, 2017: We apologize for any difficulties or delays in posting new discussions to the Community on cypress.com. We are in the process of merging our support forums onto a single platform in an effort to create a much-improved community experience for you.
BLE data to DAC output
I'm designing a data collection system which collects data over bluetooth using the Heart rate collector example. The data transmitter I've implemented on a different chip, but I've verified its functionality with debug mode in terminal. However, I want to set the level of the IDAC using the received "Heart rate". In the hrsc.c file, right under where it would usually print the heart rate to terminal in debug mode, I put IDAC_SetValue(HrscGetHeartRate()/4); The values I receive are between 0 and 1023, and the IDAC on the PSoC 4 is set to 8 bits, hence the division by four.
However, when I run the code, this is what I get when I connect it to an oscilloscope:
The IDAC output constantly resets, as if running PWM mode. Here's a zoom-in:
I can't figure out why this is happening, anyone have an idea?