Hello everyone,
I have a question regarding the PT2000 example code. I am working with the S32K144_PT2000_EXAMPLE project and modified the first three elements of the PT2000_data_RAM array in the PT2000_LoadData.c file. After flashing the firmware to the S32K144-Q100 board and connecting the FRDMPKPT2000EVM, I observed the current waveform on an oscilloscope. However, the waveform remained unchanged despite my modifications to the data RAM.
Could someone please help me understand why the changes are not taking effect? Is there something I'm missing, such as a specific initialization step or a different data RAM section that needs to be modified?
Thank you in advance for your help!
Okay, thank you. Have a nice day!
Hello D1ego,
Hi,Jozef
Thank you for your reply. I will try your suggestion.
I have one more question regarding this line of code:
send_single_PT2000_SPI_Cmd(WRITE, ch1_ctrl_reg_uc0, 0x00);
Could you please clarify:
· What is the purpose of this function?
· What does the value 0x00 represent in this context?
· Is there a register map or user manual that describes the bit definitions for this register?
· If I change this value to a different one (e.g., 0x40, 0x80, etc.), what effect would it have on the output waveform or current profile?
I am trying to understand how to configure the current profile correctly.
Thank you for your help!
With Best Regards,
D1ego
Hello D1ego,
In the ProgramDevice() function, I already call download_RAM(DATA_RAM). Isn't this the code that loads the data to the DPRAM? Do I need to add any additional code somewhere else to ensure the data is actually loaded?
[A] Yes, download_RAM(DATA_RAM) is the correct function to write your modified data into the PT2000 DPRAM, however, this function only updates the data memory. It does not ensure that the new data is actually used for waveform generation.
No additional code is needed to write DPRAM, but you must ensure the PT2000 sequencer is restarted/triggered after the download so that the new data is applied.
2. Regarding "restart the PT2000 after modification" – what is the exact operation you mean? Currently, I pull the RESETB pin low and then high to reset the PT2000, and then re-execute ProgramDevice(). Is this correct? If not, what should I do instead?
[A] Correct procedure:
Reset the device first
Load the new data
Start/re-enable the PT2000 operation
Hi Jozef,
Thank you for your explanation. I have modified the values in the PT2000_data_RAM array and then flashed the program to the board. However, the waveform still does not change.
I have two specific questions:
In the ProgramDevice() function, I already call download_RAM(DATA_RAM). Isn't this the code that loads the data to the DPRAM? Do I need to add any additional code somewhere else to ensure the data is actually loaded?
Regarding "restart the PT2000 after modification" – what is the exact operation you mean? Currently, I pull the RESETB pin low and then high to reset the PT2000, and then re-execute ProgramDevice(). Is this correct? If not, what should I do instead?
Thank you for your help!
Best regards,
D1ego
Hello D1ego,