my advice ,i am building uds boot loader , the uds service 10 01 means system rest,i want to know how to write reset fouction ,need your help ,hope your relply.
Hi @zq1 ,
It sounds like you're working on a UDS bootloader for the S32K144 and you're looking to implement the UDS service 10 01, which is for ECU reset. Here's a basic example of how you might implement a reset function:
void resetECU(void) { SCB_AIRCR = SCB_AIRCR_VECTKEY(0x5FA) | SCB_AIRCR_SYSRESETREQ_MASK; }
This function writes to the Application Interrupt and Reset Control Register (AIRCR) in the System Control Block (SCB) to request a system reset. The VECTKEY field must be set to 0x5FA, otherwise the write to this register is ignored.
Remember, this is a very basic example and your actual implementation may need to be more complex, depending on your specific requirements. For example, you might need to save certain data before the reset, or you might need to perform some cleanup tasks after the reset.
For more information on the S32K144 and its registers, you can refer to the S32K144 Microcontroller Reference Manual.
For more information on UDS services, you can refer to the Understanding UDS Services article.
where i can find the function
SCB_AIRCR_VECTKEY
????????