S32K144_PT2000_EXAMPLE: Modifying DATA_RAM has no effect

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

S32K144_PT2000_EXAMPLE: Modifying DATA_RAM has no effect

111 Views
D1ego
Contributor I

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!

PT2000 S32K144EVB 

0 Kudos
Reply
6 Replies

71 Views
JozefKozon
NXP TechSupport
NXP TechSupport

Hello D1ego,

the PT2000_data_RAM array is only a software buffer; modifying it does not directly affect the waveform unless the updated data is explicitly transferred to the PT2000 DPRAM. In the example project, the data is typically loaded during initialization, so user modifications may be overwritten or ignored if not applied at the correct point in the sequence. It is recommended to modify the data immediately before the final PT2000_LoadData() call and ensure the PT2000 is restarted afterward.
 
With Best Regards,
Jozef

60 Views
D1ego
Contributor I

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:

  1. 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?

  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?

Thank you for your help!

Best regards,

D1ego

0 Kudos
Reply

45 Views
JozefKozon
NXP TechSupport
NXP TechSupport

Hello D1ego,

  1. 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:

  1. Reset the device first

    • Pull RESETB low → high
    • Wait for the device to initialize
  2. Load the new data

    • Call download_RAM(DATA_RAM)
  3. Start/re-enable the PT2000 operation

    • Ensure the PT2000 sequencer is explicitly started (depending on your software/driver)
 
With Best Regards,
Jozef

41 Views
D1ego
Contributor I

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

0 Kudos
Reply

38 Views
JozefKozon
NXP TechSupport
NXP TechSupport

Hello D1ego,

send_single_PT2000_SPI_Cmd(WRITE, ch1_ctrl_reg_uc0, 0x00); 
This command writes a control value to the Channel 1 control register via SPI. It is used to configure the operating mode and behavior of the channel.
 
With Best Regards,
Jozef

34 Views
D1ego
Contributor I

Okay, thank you. Have a nice day!

0 Kudos
Reply