I am working on reading the accumulator memory from MDEK1001. I have modified the example from “Example 2c: simple RX with diagnostics” in DW1000 API and it works fine in MDEK1001, and I can show the values of the accumulator data from UART. But there are two problems I found:
(1) In Example 2c, it only read 6 symbols from the accumulator. The buffer length is defined as:
#define ACCUM_DATA_LEN (22(3+3)+1)
I want to read the whole data, i.e., around 1000 symbols from the accumulator. However, I found that if I enlarge the buffer length:
#define ACCUM_DATA_LEN (22(1016)+1)
The code can be built and run, but it gets stuck.
So I tried different sizes, and I found that the code can only work properly when the size is small, such as 20 symbols.
I guess this is because of the interrupts when reading the accumulator? May I know how to solve this?
(2) My second question is about saving the data to a .txt file. Currently, I can display the data on a terminal from UART. But I want to save it to a .txt file. I used
fp = fopen(“Data.txt”,“w”);
fprintf(“some data %d \r\n”,accum_data);
But I found that the code was stuck on fopen.
The above are my two questions. I hope someone could help me. Thanks in advance.