Change configuration code lost

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
songzaiwu
Level 3
Level 3
50 sign-ins 10 questions asked 25 sign-ins

I have added code.微信截图_20220808111113.png

I modified the configuration。

QQ截图20220808111220.png

 

I recompiled the code and the added code was lost. How to set , the code I added is not lost?

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.

songzaiwu,

I've attached a very simple project with your requested code example that uses the UART_SetCustomInterruptHandler(&<your_function_name>) method.

I could not find your selected device (CYBL10563-56LQXI) in the Creator device list.  So you will have to change the device.   Note:  The device I chose that uses the SCB comm block I do not have either.  Therefore I have not been able to test the code since I have no kit boards with this type of device.   However, the code compiles without complaint.

Len
"Engineering is an Art. The Art of Compromise."

View solution in original post

0 Likes
3 Replies
Len_CONSULTRON
Level 9
Level 9
Beta tester 500 solutions authored 1000 replies posted

,

There three ways to handle placing your own code in the ISR.

  • Using 

Len_CONSULTRON_0-1659953406370.png

  • Using Len_CONSULTRON_1-1659953451346.png

     

  • Using Len_CONSULTRON_2-1659953497319.png

     

Although technically you could use all three methods, it is normally recommended to use only one.

Consult the UART datasheet how to use these methods.

Once you enable one of these methods you place your custom code in a function.

In the case of the ENTRY_CALLBACK, the function would be called UART_SPI_UART_ISR_EntryCallback();

In the case of the EXIT_CALLBACK, the function would be called UART_SPI_UART_ISR_ExitCallback();

With the last one you would use: UART_SetCustomInterruptHandler(&<your_function_name>);

Either of these methods avoid losing your code changes when the project is compiled at the Application Build phase.

Len
"Engineering is an Art. The Art of Compromise."
0 Likes
songzaiwu
Level 3
Level 3
50 sign-ins 10 questions asked 25 sign-ins

Can you make a simple routine to take a look?

0 Likes
lock attach
Attachments are accessible only for community members.

songzaiwu,

I've attached a very simple project with your requested code example that uses the UART_SetCustomInterruptHandler(&<your_function_name>) method.

I could not find your selected device (CYBL10563-56LQXI) in the Creator device list.  So you will have to change the device.   Note:  The device I chose that uses the SCB comm block I do not have either.  Therefore I have not been able to test the code since I have no kit boards with this type of device.   However, the code compiles without complaint.

Len
"Engineering is an Art. The Art of Compromise."
0 Likes