Hi Petr,
For example, I´m trying to read Device ID like this function:
unsigned int GetDeviceID(void)
{
word UJA107xA_ICR;
enum UJA107xA_Type Device;
// Write Device ID pattern
UJA107xA_ICR = DeviceIdPattern; /* DeviceIdPattern = 0x4308 */
SpiSend(&UJA107xA_ICR);
// Read back Device ID pattern and restore previous ICR content
UJA107xA_ICR = ICR_ADDRESS_MASK; /* ICR_ADDRESS_MASK= 0x4000 */
SpiSend(&UJA107xA_ICR);
if(UJA107xA_ICR == UJA1078A_DeviceIdPattern){
Device = NXP_UJA1078A;
}
else if(UJA107xA_ICR == UJA1075A_DeviceIdPattern){
Device = NXP_UJA1075A;
}
else if(UJA107xA_ICR == UJA1076A_DeviceIdPattern){
Device = NXP_UJA1076A;
}
else if(UJA107xA_ICR == UJA1079A_DeviceIdPattern){
Device = NXP_UJA1079A;
}
return Device;
}
This is my SPI communication log:
I should have the reply 0x4008, because my device is UJA1076A, but I dont get nothing.
Thank you.
Hi,
Its working now. I double checked all wires and also SPI configuration, now I can control V2 voltage and also get DeviceID.
Hi,
we can only provide the library/driver that is mentioned in chapter 5.1 Attached files of the AH1002.
See the package onhttps://community.nxp.com/message/984603
BR, Petr