We are developing a new DA14531 application that we haven't decided on the optimum boot device for. The design uses the 24 pin QFN24 package. In the schematic I have populated both a SPI and an I2C flash with the MISO and SDA (P0_3) pins shared and the SCK and SCL (P0_4) pins shared between the devices. Is this a valid sharing of pins? The bootloader sequence looks as if these are the default pin assignments for boot. If we decide to boot from a SPI flash and use P0_3 and P0_4 as MISO and SCK, can I still also use these pins after boot to talk to an I2C sensor that will also be on board?
Device:
Hi There,
谢谢你的问题n and for your interest in our DA14531 solution.
Please seeAN-B-072: DA14531 Booting from OTP and Serial Interfaces. According to Section 4 Booting Sequence and booting pins, the P0_3 and P0_4 are used for device is booting from ext SPI Slave.
After the booting, you could configure those pins as I2C in your software and use them for your sensor. You should also set the SPI CS to HIGH.
However, my doubt is while the chip is booting from flash. In that case, the I2C will take both SDA and SCL, so you have to make sure that the sensor will not output data in the SDA line. Please keep in mind that P0_3 is the MISO, so the whole firmware will be downloaded thought that pin. During the booting, if sensor data are coming to that line, that will corrupt the booting sequence. To do, please double check that while booting from flash, will not affect the I2C sensor.
Can I ask why you would like to proceed with this implementation? Are there any other free GPIOs to connect the I2C sensor? If yes, my recommendation would to change the schematic and place the sensor to different GPIOs.
Thanks, PM_Dialog
目前没有other free GPIO pins in the design, however I think I can change the architecture a bit to move the SDA line so that we avoid sharing this pin with MISO. Thanks for your help.