Hi, I don't know why. But when I check the pin's voltage, it seems that voltage is just about 1V. After changed another nhs3152 chip, the output is back to 2.7V.
For application reason, I need to simulate SPI through GPIO now. Unfortunately, using some configurations like example does not actuate pins.
some pins don't work at all, some start working, however, the voltage is 1+V. the configuration is as follows:
Chip_Clock_System_SetClockFreq(NSS_SFRO_FREQUENCY/2);
Board_Init();
Chip_IOCON_SetPinConfig(NSS_IOCON, IOCON_PIO0_8, IOCON_FUNC_0 |IOCON_RMODE_INACT); /* MISO */
Chip_IOCON_SetPinConfig(NSS_IOCON, IOCON_PIO0_9, IOCON_FUNC_0 |IOCON_RMODE_INACT); /* MOSI */
Chip_IOCON_SetPinConfig(NSS_IOCON, IOCON_PIO0_2, IOCON_FUNC_0 |IOCON_RMODE_INACT); /* SSEL */
Chip_IOCON_SetPinConfig(NSS_IOCON, IOCON_PIO0_6, IOCON_FUNC_0 |IOCON_RMODE_INACT); /* SCLK */
Chip_GPIO_SetPinDIRInput(NSS_GPIO, Pinport, MISO);
Chip_GPIO_SetPinDIROutput(NSS_GPIO, Pinport, MOSI);
Set_MOSI_Low; //define to set counterpart pin to the value I need
Chip_GPIO_SetPinDIROutput(NSS_GPIO, Pinport, SSEL);
Set_SSEL_High;
Chip_GPIO_SetPinDIROutput(NSS_GPIO, Pinport, SCLK);
Set_SCLK_Low;
May my answer will help you.
Regards,
Lee