0
votes

I Need to communicate my EFM32LG with a dac80004 USING SPI.
When i define USART in SPI mode i need to define the pins and ports as follwoing:
Port A pin 2: chip select sync_not (active low)
Port E pin 10: MOSI (SDIN)
Port E pin 11: MISO (serial interface digital out)
Port E pin 12: SCLK
Port A pin 1: clear DAC pin

From the API shown in the link bellow,I have only _USART_ROUTE_LOCATION_LOC0 .
How do i Put set my actual locations Using the API of SPIDRV?
Thanks.\

https://docs.silabs.com/mcu/latest/efm32lg/group-SPIDRV#gaec2cac185e42ded3da0d3e2d5cd56226 enter image description here

1

1 Answers

0
votes

The values listed there are the defaults, they're not the only option.

If you look at the EFM32LG datasheet, page 352 there are other locations where you can set up the USART0 SPI pins.

Location 0 is fine for MOSI, MISO and CLK, but the CS would need to be PE13 if you want it driver controlled.

Alternatively, you could alter spidrvCsControlAuto to spidrvCsControlApplication and control the CS manually as a GPIO.