How to use nrf52832 spi to set icm42670p internal clock running during setup progress?

Thanks in advanced. Based on nRF5_SDK_17.0.2, I can use i2c with icm42670p normally. Due to power consideration, I need to r/w this imu with spi either to decide which is the lower power design. But what makes me confused is: I can r/w icm42670p's register with spi normally, but always get wrong MCLK_RDY value(in function: inv_imu_switch_on_mclk, icm42670p eMD). I noticed that AN-000352 is mentioned when use spi interface, but unfortunately I can't find this sheet. Would any experts tell me how to get it? Or point out what key steps I missed directly. I will provide more details if needed. Thanks again.

Parents Reply Children
  • Thanks. I'm installing NCS, the tool chain setup is very slow. Meanwhile, I want to double check the icm42670p spi pcb connection: I use nrf52832-ciaa, H2<-->SDO(PIN1), H3<-->SDI(PIN14), H4<-->CLK(PIN13), H5<-->CS(PIN12), VDD and VDDIO are both 3V. Is there any mistake?

  • Are you using an nRF52832 DK from us, or some custom board, or a 3rd party board?

    Either way, I would try to avoid these pins, at least until you get things to work:

    P0.00 (LFXO)
    P0.01 (LFXO)
    P0.05 (UART logging)
    P0.06 (UART logging)
    P0.07 (UART logging)
    P0.08 (UART logging)
    P0.09 (NFC pin)
    P0.10 (NFC pin)
    P0.21 (Reset pin)

    It is possible to use all of these pins, but each of them require some configuration to your board files, so to get things up and running, and for testing, it may be easier to use different pins. So in this case, change SDO from pin 1 to e.g. pin P0.21. (or any other pin. P0.21 is just close to P0.00 on the DK's pin header). 

    Also note, on the back of the DK, it is written what pins that are in use by default. P0.13 -> P0.20 are buttons and LEDs, but it is possible to use them. Just be aware that pressing the buttons on the DK will drag the pin down to GND. 

    Best regards,

    Edvin

Related