UJA113F3V4 System Base Chip SPI configuration

cancel
Showing results for 
Search instead for 
Did you mean: 

UJA113F3V4 System Base Chip SPI configuration

391 Views
tomasfrcek
Contributor III

Hello,

I'm trying to configure the UJA113F3V4 SBC (reprogramm the non-volatile memory and exit the Forced Normal Mode) with the S32K148 MCU. I'm using the LPSPI1 peripheral of the MCU and the pins are configured and interconnected in the following manner:

PTA26 (LPSPI1_PCS0) - SBC 10 (SCSN)

PTA27 (LPSPI1_SOUT) - SBC 8 (SDO)

PTA28 (LPSPI1_SCK) - SBC 9 (SCK)

PTA29 (LPSPI1_SIN) - SBC 7 (SDI)

The LPSPI1 peripheral is configured to 5MHz SPI clock, the delays between frames are 8 us long, CS falling to first CLK is 100 ns and last CLK to CS rising is 50 ns. All SPI transfers are 8bit long. These parameters are oscilloscope checked.

The SPI communication between MCU and SBC seems to work, I receive valid responses to the following requests (requesting most of the remaining addresses always yields 0x0 as a response from the SBC, because the SBC is still in the Forced Normal Mode I guess):

  • 0x70: returns 0x1 (Bit NVMPS in the MTPNV status register, I would expect this to be 0x0 after successfull reprogramming of the MTPNV cells).
  • 0x7E returns 0x50
  • 0x7F returns 0x0A

So now I need to reprogramm the non-volatile momory cells in order to exit the Forced Normal Mode. First I tried to send the following sequence of SPI frames to reprogramm the individual registers 0x71..0x74, 0x75 CRC:

0x71, 0x0F, 0x72, 0x0F, 0x73, 0x08, 0x74, 0x16 (here the FNMC bit is set to 0).

After reset, the values of registers 0x71..0x74 didn't change and register 0x70 still had the value 0x1.

So I tried to send only the address 0x71 followed by the 4 8bit data words for the registers 0x71..0x74 + 8bit CRC word: 0x71, 0x0F, 0x0F, 0x08, 0x16, 0xCRC. The result was the same.

The CRC algorithm I'm using returns correct data according to examples in this document: https://www.google.cz/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0ahUKEwjvpNyhvJjZAhUNzqQKHYylD-AQ... 

Thank you in advance for any advice!

Tomas

0 Kudos
1 Reply

148 Views
razva_tilimpea
NXP Employee
NXP Employee

Hi Tomas,

Please check that on the SDK which is delivered with S32 Design Studio for ARM you can get the driver for this device and in doxygen documentation where is explains how to  exit from Forced Normal Mode.

Based on current details I think you didn't performed the hardware reset before sending spi command to exit from FNMC. 

pastedImage_1.png

Best regards,

Razvan

0 Kudos