iMX7 SPI Chip select is active low after M4 startup till first use

SPI working. However by default the chip select remains active low and boot till 1st use of port. Problem if 2 chip selects and both are active low.

Two questions:

  1. SPI is mostly configured correctly since it works. How to default to inactive high.

  2. Assume after power up, a pin does not yet know it’s SPI or GPIO and would be Hi-impedance. Is the boot loader forcing the CS low?

How early can a pin be configured? Power-up Hi-Z?
Inside the boot loader or once program runs on M4?

thanks,
Robert

Dear @bobpbbd104

  1. I haven’t used SPI with two chip selects myself. I recommend you read the SPI documentation in the i.MX7 reference manual to learn how to configure the second SPI chip-select inactive. If the SPI controller does not support it (it might be a bug in the chip hardware?) a simple workaround would be to issue a dummy transfer as part of the initialization sequence.
  2. The power-up state of the pins is hard-wired in the i.MX7 chip and therefore cannot be configuerd. The reset state is documented in the i.MX7 reference manual. If the signal’s reset state is High-Z, you can add a pull-up resistor to force it high.
    The bootloader’s configuration options depend on the actual bootloader you are using.

Regards, Andy