Closed ppannuto closed 3 years ago
Writing notes to myself on this, regarding SPI reconfiguration.
Currently everything is hanging off of SPI0
, where "everything" is only the Accelerometer and the SD Card.
This is what HW does / will do:
Bus / Interface | What's on it |
---|---|
CPU | Memory accesses... |
USB | Not used yet, but might be for data transfer; unlikely to conflict since won't be actively sensing while USB is in use. |
SPI{M/S}1 / TWI{M/S}1 | Squarepoint comm's over TWI1 |
Radio | Bluetooth.. |
Crypto | Not yet, but maybe someday? |
ADC | (unused) |
UARTE0 | (unused) When in non-RTT mode, this was the used UART; not likely to see meaningful use again |
SPI{M/S}0 / TWI{M/S}0 | Currently SPIM0 shared among external RTC, SD Card, and Accelerometer |
SMI{M/S}2 | (unused) ACTION: Move RTC and SD Card here; less realtime than accel |
.. no NFC, I2S, PDM .. | |
PWM0 | Drives on-board buzzer |
.. no PWM1, PWM2, QSPI, PWM3, UARTE1, SPIM3 .. |
Pin updates from SPI reconfiguration:
Added some "Board ID" GPIOs. Not sure if this will prove useful or not, but there are several surplus GPIOs on the nRF, several of which are designated for 'low frequency signals' only, so not so much harm in tieing them up, at least for now.
Rev H "ID":
STM PA0
now attached to nRF P0.26
(n.b. this was the GPIO1
test point for the nRF before, which hasn't been used in a while, so dropping it because routing anything else would have been insane).
For the !CHG
LED, I just tied that to +3v3
instead; this means that the charging LED won't work if the switch is off, but the alternative would require adding another discrete FET for something we're not really using right now anyway. We may even consider DNP'ing D1
and using an internal pull-up on the nRF to monitor the charging status, but that's an easier change to do later.
Updated to LSM6DSOX + LIS3MDL.
Pins updated again:
NRF_CS_SD
moved to P0.13
(was SPI0_MOSI)NRF_SPI0_SCLK
-> P0.20
NRF_SPI0_MOSI
-> P0.22
NRF_SPI0_MISO
-> P0.24
MAG_INT
-> P0.23
MAG_DRDY
-> P1.00
The LIS3MDL is chained off of the "SenseHub" of the LSM6DSOX, that is, the 6-DOF is an I2C master for the magnetometer. From reading a few datasheets and app notes, I'm pretty sure this is entirely the idea, that you can end up programming the magnetometer "through" the other chip, which will then run a state machine to automatically read samples and feel those samples into its processing engine. This auto-read is time-based, which is why there's no input to the 6DOF for the INT
or DRDY
signals from the magnetometer, but as a hedge, I hooked those up to the nRF directly anyway. I flirted with the idea of hedging and connecting the sensehub I2C bus to the nRF as well, but that was just going to be way too much work to route something that we won't use.
rev_H ready for manufacture .. at scale!
!CHG
LED is active when switch is offRTC_nCS
pulled up to+3v3