Skip to main content
deleted 21 characters in body
Source Link
Voltage Spike
  • 88.8k
  • 49
  • 90
  • 234

I am planning on using simplex receive with SPI2 - does this mode sound reasonable based on the ADS1234 interface waveforms?

Yes, you should be able to use a hardware SPI port on the STM32 to communicate with the ADS1234

The ADS1234 is 24-bit and the STM32L only goes up to 16-bits in the buffer. My thinking is to configure it for 12-bits and do two transfers, although I'm not sure if this will conflict with anything?

That will work, you can also set up the buffer for 8 bytes also. At the end of the transfer the buffer will fill up and generate an interrupt (if you set it up that way) which you will need to copy the data out of the buffer before you initiate another transfer.

Since using the DRDY function is not completely a part of the SPI protocol, I'm wondering how to have this trigger a data transfer. If the DRDY/DOUT pin state goes from high to low (indicating data is ready) should I configure for an interrupt-on-change (IOC) event and then go into completing a transfer?

There are two ways you could run the sampling of the ADC1234:

  1. initiate an ADC sample and then deterministically wait with a timer or delay the data transfer until you know DRDY has gone low, then initiate a transfer.

  2. Do what you suggest and wait for the DRDY to go low with an EXTIa GPIO port using EXTI on the STM32 (not all GPIOS support this) then initiate a transfer.

I am planning on using simplex receive with SPI2 - does this mode sound reasonable based on the ADS1234 interface waveforms?

Yes, you should be able to use a hardware SPI port on the STM32 to communicate with the ADS1234

The ADS1234 is 24-bit and the STM32L only goes up to 16-bits in the buffer. My thinking is to configure it for 12-bits and do two transfers, although I'm not sure if this will conflict with anything?

That will work, you can also set up the buffer for 8 bytes also. At the end of the transfer the buffer will fill up and generate an interrupt (if you set it up that way) which you will need to copy the data out of the buffer before you initiate another transfer.

Since using the DRDY function is not completely a part of the SPI protocol, I'm wondering how to have this trigger a data transfer. If the DRDY/DOUT pin state goes from high to low (indicating data is ready) should I configure for an interrupt-on-change (IOC) event and then go into completing a transfer?

There are two ways you could run the sampling of the ADC1234:

  1. initiate an ADC sample and then deterministically wait with a timer or delay the data transfer until you know DRDY has gone low, then initiate a transfer.

  2. Do what you suggest and wait for the DRDY to go low with an EXTI port on the STM32 (not all GPIOS support this) then initiate a transfer.

I am planning on using simplex receive with SPI2 - does this mode sound reasonable based on the ADS1234 interface waveforms?

Yes, you should be able to use a hardware SPI port on the STM32 to communicate with the ADS1234

The ADS1234 is 24-bit and the STM32L only goes up to 16-bits in the buffer. My thinking is to configure it for 12-bits and do two transfers, although I'm not sure if this will conflict with anything?

That will work, you can also set up the buffer for 8 bytes also. At the end of the transfer the buffer will fill up and generate an interrupt (if you set it up that way) which you will need to copy the data out of the buffer before you initiate another transfer.

Since using the DRDY function is not completely a part of the SPI protocol, I'm wondering how to have this trigger a data transfer. If the DRDY/DOUT pin state goes from high to low (indicating data is ready) should I configure for an interrupt-on-change (IOC) event and then go into completing a transfer?

There are two ways you could run the sampling of the ADC1234:

  1. initiate an ADC sample and then deterministically wait with a timer or delay the data transfer until you know DRDY has gone low, then initiate a transfer.

  2. Do what you suggest and wait for the DRDY to go low with a GPIO port using EXTI on the STM32 then initiate a transfer.

Source Link
Voltage Spike
  • 88.8k
  • 49
  • 90
  • 234

I am planning on using simplex receive with SPI2 - does this mode sound reasonable based on the ADS1234 interface waveforms?

Yes, you should be able to use a hardware SPI port on the STM32 to communicate with the ADS1234

The ADS1234 is 24-bit and the STM32L only goes up to 16-bits in the buffer. My thinking is to configure it for 12-bits and do two transfers, although I'm not sure if this will conflict with anything?

That will work, you can also set up the buffer for 8 bytes also. At the end of the transfer the buffer will fill up and generate an interrupt (if you set it up that way) which you will need to copy the data out of the buffer before you initiate another transfer.

Since using the DRDY function is not completely a part of the SPI protocol, I'm wondering how to have this trigger a data transfer. If the DRDY/DOUT pin state goes from high to low (indicating data is ready) should I configure for an interrupt-on-change (IOC) event and then go into completing a transfer?

There are two ways you could run the sampling of the ADC1234:

  1. initiate an ADC sample and then deterministically wait with a timer or delay the data transfer until you know DRDY has gone low, then initiate a transfer.

  2. Do what you suggest and wait for the DRDY to go low with an EXTI port on the STM32 (not all GPIOS support this) then initiate a transfer.