Re: Question abt SPI and Microcontroller
Hello!
Usually you don't use GPIO for SPI, you choose a processor which is SPI capable.
You can simulate SPI by GPIO, it's called bit banging, but the easiest way to do SPI
is to use a processor with an internal SPI device. Of course, you will use GPIO for
chip select.
The way to do it is to wire your MCU_MISO to all your devices MISO
same for MOSI and clock, and wire one CS per device to one bit of a GPIO.
PA09 SPI0 - NPCS[2]] as ASIC_SPI_CS
PA16 [SPI0 - NPCS[0]] as ACC1_SPI_CS
PA23 [SPI0 - NPCS[1]] as ACC2_SPI_CS
PA24 [SPI0 - NPCS[0]] as ACC3_SPI_CS
By the way, isn't it logically PA24 [SPI0 - NPCS[
2]] as ACC3_SPI_CS?
For Zarlink:
I dont have a clock so can i use any GPIO to generate clock.
PA10 [SPI0 - NPCS[2]] as Zarlink_SPI_CS
Then MISO and MSI as PA18 and PA19 resectively.
What do you mean by I don't have a clock? The zarlink module does not have a clock?
In this case it's an UART and you should wire it to the MCU UART, not to GPIO.
Dora.