cancel
Showing results for 
Search instead for 
Did you mean: 

How implemented the code where user can provide the file in csv format to DAC for different output waveforms

MDeva.1
Associate II

Hello,

I am working on Nucleo-h745ziq board, I interface the AD9106 sensor. I have to generate the different output waveforms for this I have to use the CSV file. How the CSV file is import in stm32cubeide.How I can read the CSV file. Can you help me?

2 REPLIES 2

Write a small C application (Python script, or whatever kids use these days to quickly code a solution) on your host PC to read and parse the .CSV file, and have it output a .C file or .H file with the numeric content expressed as a C array variable. Say uint16_t DacData[] = { .... , ... };

Add this file to your project , and have the code use DacData and sizeof(DacData) / sizeof(uint16_t) to reference the data you've imported.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
MM..1
Chief III

You need define if CSV is used in runtime or buildtime. Buildtime explain Tesla

Runtime is on your board Ethernet ,USB or other way to load CSV..., but here you need write something about CSV, because here can be samples, but for examplke too

SINE,10k,2sec

RECT,2k,3sec

... is too CSV