I am trying to integrate a magnetometer with a 5213. The specific sensor I am working with needs it's reset pin toggled and 8 bits sent to it.... then it makes a measurement and sends back 16 bits. I can set up the QSPI module to send the first 8 bits but don't know how to set it up to wait for and record the 16 bit "answer".
Would some bit banging code be a good (strait forward?) alternative?
Thanks,
Matt Jewell
QSPI Application ?
Re: QSPI Application ?
SPI is duplex so for every bit you send out, you receive a bit. You can make the delay with a timer or loop, when the time expires send 16 more bits out. As the 16 bits go out, your 16 bits of answer should come in.