Other Parts Discussed in Thread: HALCOGEN
Dear TI Experts,
I'm using HALCoGen to generate source code files for the TMS570LC435 (and using the FreeRTOS variant). I would like to write some personal/customized code to be executed at the beginning and at the end of the gioSetBit() function. I am aware that I need to place my code inside the "USER CODE BEGIN" comment block so that my code does not get overwritten by HALCoGen. The function gioSetBit() has a user code block defined at the beginning of the function but not at the end of the function. Is there a way for me to manually insert a new user code block outside of those that were provided by HALCoGen?
Here's a screenshot depicting the issue that I'm running into:

I tried to add my own comment block similar to "USER BLOCK BEGIN (X)" and it didn't work; I tried several variations and different numbers without any luck. So my question is what can I do to add custom code where there isn't a pre-defined USER BLOCK" section?
Thank you,
Aamer
p.s. the reason I'm trying to do this is to be able to temporarily change CPU mode from 'user' to 'privileged' because RTP/DMM GIO's can not be controlled when CPU is in 'user mode'. If you have a different solution for me to try, I would be very grateful