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.

BOOSTXL-PGA460: Bus demo questions

Part Number: BOOSTXL-PGA460
Other Parts Discussed in Thread: ENERGIA, PGA460

Hello,

I am running the bus demo in the Energia IDE and have some related questions. I was given a video guide on getting it running and eventually managed to do so.

For the bus demo, are all the transmission settings set in the first part of the setup using the GUI when burning the EEPROM? Is there a way to change settings like frequency or pulse length or amplitude over the serial inteface?

Is there any reference documentation for the USSC library? Is there a command that returns raw echo data that would work with the bus demo?

I was also somewhat confused by the setup procedure over serial, as these settings aren't explained and some of them do not appear in the video guide I was given. Is there anyplace I could get a breakdown of these options and how they affect operation? I'm primarily interested in the options 7, 8, 9, 10, 12 and 13 from the list below.

1. Communication Mode: 0=UART, 2=OneWireUART ...
2. UART kBaud: 0=9.6, 1=19.2, 2=38.4, 3=57.6, 4=74.8, 5=115.2 ...
3. P1 and P2 Thresholds: 0=%25, 1=50%, or 2=75% of max ...
4. Transducer Settings: 0=Murata MA58MF14-7N, 1=Murata MA40H1S-R, x=Skip ...
5. TVG Range: 0=32-64dB, 1=46-78dB, 2=52-84dB, or 3=58-90dB, x=Skip ...
6. Fixed TVG Level: 0=%25, 1=50%, or 2=75% of max, x=Skip ...
7. Command Cycle Delay: 10ms * BYTE ...
8. Bulk User EEPROM Write: 0=false, 1=true ...
9. Bulk TVG Write: 0=false, 1=true ...
10. Bulk Threshold Write: 0=false, 1=true ...
11. Number of Devices on Bus: 1-8 ...
12. OWU Ready: 0=Yes, 1=No,UART-Config, 2=No,IO-Config ...
13. Burn User EEPROM?: 0=No, 1=Yes ...

Kind regards,

Kai Dworski

  • Hi Kajetan,

    The settings you've burned in the EEPROM of the device are initally read from and copied into SRAM. The register refers to the values in SRAM during operation, so it is possible to update the driver and receiver settings such as frequency and pulse length on the fly. You can either perform a single register write or use any of the bulk write commands to updates common groups (time varying gain or threshold). I have provided these commands as functions in the PGA460_USSC.cpp file of the PGA460 Energia Library and Code Example (Version 1.0.8) download. Specifically look for these functions:

    • registerRead
    • registerWrite
    • thresholdBulkRead
    • thresholdBulkWrite
    • eepromThreshold
    • initThresholds
    • initTVG
    • defaultPGA460

    Some of the functions allow your to set the register values through the serial interface, while others are hard-coded in the PGA460_USSC.cpp file. You can also create your own functions to group single register write certain registers. All commands always read/write to the SRAM. I call these the working registers or shadow registers. EEPROM is only read once during start-up to fill the working registers. I recommend you review Table 3. UART Interface Command List from the PGA460 datasheet to understand the available commands, and how each functions utilizes these device specific commands.

    There is no document specific to the library functions other than the high level discussion offered by the PGA460 Software Development Guide app note. The details of each function are discussed in the PGA460_USSC.cpp file. The Energia examples are commented to show how these functions are used in specific use-cases.

    The userInputMode allowing you to configure, run, and view the demo results trough serial executes some of the above functions.

    To elaborate on the options of your interest:

    7) Determines how much delay the MCU should wait in milliseconds between each complete burst/listen and data capture cycle. In this case, the minimum delay is 0ms (back-to-back measurements as fast as possible), or 90ms (approximately 10 measurements per second after factoring in the serial terminal print time overhead).

    8,9,10) With regard to the bus demo, these options should be preempted with "Broadcast". When any of these options are enabled, the MCU sends a broadcast command to bulk write the user EEPROM, TVG, and/or Threshold values for all devices on a UART/USART/OWU bus, regardless of UART_ADDR. Placeholder for user EEPROM broadcast available. Note, all devices will update to the same UART_ADDR in user EEPROM broadcast command (may not be preferable when multiple devices are connected to the bus; recommend to use false condition).

    12) If you have already EEPROM programmed the PGA460 wit IO_IF_SEL=1 for OWU operation on the IO pin, then you can select 0=Yes. However, the factory setting is IO_IF_SEL=0 for TCI operation on the IO pin. If you have UART connected to the devices as well, then you can update the IO_IF_SEL bit through UART (use choice 1). However, if you only have the IO pin connected, then you must use choice 2 to execute the In-System IO-Pin Interface Selection.

    13) Burning the User EEPROM is only required if you want to save all of the latest SRAM settings to EEPROM memory. If you power-up with the correct values from EEPROM, then there is no need to run the EE burn command.

    If you've already EEPROM programmed and configured the device to your preference using the GUI prior to running the Energia demo, then you can skip the majority of the device related setup on the serial interface (use 'x ' character to skip).