This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

PGA450-Q1: Set/get SFR registers

Part Number: PGA450-Q1
Other Parts Discussed in Thread: TIDA-00151

Hello,

I would like to set/get ESFR registers (like LPF_B1_MSB, LPF_B1_LSB,...) through UART command, sending the address of the parameters (e.g. 0x92 for LPF_B1_MSB) and giving the new value or getting the current value.

Is this possible?

Thanks,

M.

  • HI Michele,

    Yes, you can update ESFR values through a UART command. You can use the latest revision of "TIDA-00151 UART & LIN Demo Firmware for PGA450-Q1 v2.4" ( www.ti.com/.../tidcab3 ) command-5 as an example or starting point for this type of dynamic ESFR modification. Command-5 reads the values from EEPROM address range 0x0B-0x1E, loads these values into select ESFR registers (including LPF_B1_MSB, LPF_B1_LSB,...), and finally executes a burst+capture command. From the "pga450_main.c" file, you can see which ESFRs can be modified using this command:
    PULSE_CNTA = data_EEPROM[11];
    BLANKING_TIMER = data_EEPROM[12];
    FIFO_CTRL = data_EEPROM[13];
    DOWNSAMPLE = data_EEPROM[14];
    CONTROL_1 = data_EEPROM[15];
    BURST_MODE = data_EEPROM[16];
    BURST_ONA_LSB = data_EEPROM[17];
    BURST_OFFA_LSB = data_EEPROM[18];
    DEADTIME = data_EEPROM[19];
    SAT_DEGLITCH = data_EEPROM[20];
    BPF_B1_MSB = data_EEPROM[21];
    BPF_B1_LSB = data_EEPROM[22];
    BPF_A2_MSB = data_EEPROM[23];
    BPF_A2_LSB = data_EEPROM[24];
    BPF_A3_MSB = data_EEPROM[25];
    BPF_A3_LSB = data_EEPROM[26];
    LPF_B1_MSB = data_EEPROM[27];
    LPF_B1_LSB = data_EEPROM[28];
    LPF_A2_MSB = data_EEPROM[29];
    LPF_A2_LSB = data_EEPROM[30];

    Command-3 allows you to update any EEPROM register individually. Command-3 is currently set as a write only command, but contains a comment block of code which would read back the newly updated EEPROM value.

    You could modify this code example such that command-5 only serves to update the ESFRs when the EEPROM values are changed through UART and no longer also issues a burst+capture command. Then, instead of overwriting and forcing the ESFRs to hard-coded values in command-1, command-1 would simply execute a burst+capture command using the latest ESFR values set by the last command-5 routine.

    The benefit of using the EEPROM for the ESFRs would then enable the device to power-up, load the ESFRs with the EEPROM based equivalents, and ready itself for the master to issue a burst+capture command, or automatically start looping the burst+listen command. If the values aren't referenced from EEPROM, the master would need to write to the ESFRs every time the device is powered-up.