This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Tool/software:
Hello team,
I had configured GPIO12 and GPIO13 as CAN TX and CAN RX for F2800157 Controller and I can able to transmit and receive CAN data and I am checking it through PEAK CAN tool.
After that i am trying do the OTP config for the same GPIO 12 and GPIO13 for DCAN flashing.
I have configured the OTP for GPIO12 and GPIO13 for the registers,
Z1_GPREG1 (0x78008) (32 bits) is set to 5AFFFFFF
Z1_GPREG2 (0X7800A) (32 bits) is set to default value FFFFFFFF
Z1_GPREG3 (0X7800C) (32 bits) is set to FFFF0062 for (GPIO12 GPIO13)
Z1_GPREG4 (0X7800E) (32 bits) is set to default value FFFFFFFF.
We have taken care all the hardware configurations, for that CAN boot switch GPIO24 set to 1 and GPIO32 set to 0.
Now i am able to flash my microcontroller through PCAN tool. But with the same application code now the can data transmit and receive is not possible.
but, If the same application code flashed in the microcontroller without OTP Configuration, we are able to receive or transmit messages via PCAN.
For that Is there any configurations need to be taken care to use the same GPIOs for CAN data transfer, if that pin is configured for DCAN via OTP.
Regards,
Premkumar. T
Hi Premkumar,
Can you also confirm that the GPIO setup in your application code is also using GPIO12/13 as the CAN pins? Can you also check if the DCAN boot/flashing routine have the same CAN timings as the application code?
Thanks,
Joseph
Hello Joseph,
Yes, the application code is also using GPIO12/13 as CAN pins. and we have confirmed that DCAN boot is having the same CAN timings as the application code.
Regards,
Premkumar. T
Hi Premkumar,
Thanks for the information. Once you finish flashing with the CAN boot mode, what happens with your application code? Do you restart the device, set the application to boot from flash (set GPIO24 and GPIO32 both to '1') to execute the newly flashed code and expect to see do CAN receive and transmit functions?
Regards,
Joseph
Hello Joseph,
Based on our observations on OTP configured microcontroller,
1. Once we are done flashing with the CAN boot mode (GPIO24 to 1 and GPIO32 to 0), our application code is running. After changing it in Flash mode (both GPIO24 and GPIO32 to 1) and reset, our application code is not running.
2. During the initial code execution immediately after flashing,
Whatever the CAN Bit rate we are setting, (CAN_setBitRate(obj->canHandle, DEVICE_SYSCLK_FREQ, 500000, 20) ;) is getting changed and thus we cannot be able to receive the data in external PCAN tool.
This we had observed with the oscilloscope at CANTX pin.
Data is transmitted at Proper configured bit rate in controller without OTP configuration.
Data is transmitted at changed (wrong) bit rate in controller with OTP configuration.
Regards,
Premkumar. T
Hi Premkumar,
After setting the boot mode pins to execute from flash and resetting the board, can you check where the code is at? See where the program counter is pointing to. That will indicate where the code might be stuck at.
Thanks,
Joseph