ADS7038: ADS7038 Interfacing with uC STM32H742VGT6

Part Number: ADS7038

Tool/software:

Hi, I am quite new and trying to interface ADS7038 with the uC STM32H742VGT6.

1. Could you please suggest the SPI Clock Frequency and its related setting.

2. Which Register contain value of Analog Input.

3. Write and Read Sequence after Startup.

Waiting for Prompt reply

 

  • Hi Upendra,

    1. The SPI clock frequency will really be dependent on the sampling rate you would like to achieve. How many analog inputs are you trying to read?Are they relatively static signals, such as voltage, current, and temperature measurements, or more dynamic? 

    2. You have 2 main options to reading conversion data. One is to read conversion data directly on the SDO line without direct register access, as shown below. You have the choice of manual mode (below), on-the-fly mode, and auto-sequence mode.

    The other option is to read from the statistics registers, specifically the RECENT_CHx_LSB and the RECENT_CHx_MSB registers, where x indicates channel numbers 0 through 7. First, the STATS_EN bit in the GENERAL_CFG register has to be enabled. Then, if in manual, on-the-fly mode, or auto-sequence mode, you will have to capture data as usual for the registers to save conversions. In autonomous mode, conversions are controlled by an internal oscillator, so no activity is necessary on the SPI lines until the value in the registers is read. 

    3. The write and read sequence will depend on the configuration you would like to accomplish for your specific case. There are a few flow charts in the datasheet to help in configuring the proper registers for your desired operating mode. Figure 7-13 relates to manual mode, Figure 7-17 for autonomous mode, and Figure 7-18 for turbo comparator mode. I also recommend reading through section 7 of the datasheet for an overview of what features are attractive for your use case. Options include GPIO pin configuration, programmable averaging filter, mode selection, cyclic redundancy check (CRC), different formats for output data, and using the statistics registers.

    I also recommend reading through the register map, and noting down any register fields that might stand out to you or you would need more clarification on . After you have complied a list, feel free to add it here or make another post if you do not find what you are looking for on other E2E questions.

    Regards,
    Joel