Hello,
I am working with your Unified Bootloader V1 for S32k116_CAN. First problem was that S32DS studio refused to build a S32K116_CAN_bootloader project due to different naming of the header (f.e. cpu.h and Cpu.h or uds_cfg.h and uds_Cfg.h), so i rename all the required dependencies and generate an .elf file.
Then i used OpenBus tool to upload flash_driver.bin and S32K116_CAN_APP_Demo.bin but the process failed on the service SecurityAccess with subfunction 2 where OpenBus transmits a key second time, so i removed it, leaving only SecurityAccess with subfunction 1. And sequence moved forward up to the TransferData where i am stuck now.
I am using PEAK CAN converter so in PCAN-View trace section I found a few things that i do not understand:
1) When performing a RequestDownload service call the S32K116 microcontroller responds with hard-coded 0x80 value of "maximumNumberOfBlockLength" and OpenBus in the next step of TransferData ignores this value and set it to 0x82. Why?
2) According to ISO_14229 the flow of TransferData should contain request from PC and response from S32K116 which echoed received "blockSequenceCounter", but "g_stCANUdsNetLayerCfgInfo.xBlockSize" field set to zero from the beginning (and RequestDownload does not change it to 1 as mentioned is ISO). I found no code that changes it, therefore "gs_stCanTPRxDataInfo.ucBlockSize" could not be incremented and TransferData response always returns "0x0" as "blockSequenceCounter". Is it normal?
3) OpenBus and bootloader implementation uses "flow control frames" which responds with tFlowStatus, actual "blockSequenceCounter" and "xSTmin" (block sequence counter equals zero due to the previous paragraphs). After that respond TransferData communication hangs.
P.S:
I think i need to mention that i changed a linker script memory layout a bit (and also S32K116_CAN_uds.json) to be able to debug. I tried to change manually code so the "flow control frames" responses used increasing "blockSequenceCounter" by changing initial value of "g_stCANUdsNetLayerCfgInfo.xBlockSize" to 128, but no luck, after first response communication stops at "conective frame" stage.
Log screen and PEAK config
And attach the project.
Thank you and Regards!
Hello,
1) It's a known issue. In next bootloader version resolved the issue. You can get the newest bootloader version from: https://community.nxp.com/t5/S32K-Knowledge-Base/Unified-bootloader-Demo/ta-p/1423099
2) TP layer has not provide the API for change the block size.
3) What's the detail test scenarios? Default, PC tool can update APP FW over bootloader.
Thanks!
Best Regards!