- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have added code.
I modified the configuration。
I recompiled the code and the added code was lost. How to set , the code I added is not lost?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
"Engineering is an Art. The Art of Compromise."
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There three ways to handle placing your own code in the ISR.
- Using
- Using
- Using
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.
"Engineering is an Art. The Art of Compromise."
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Can you make a simple routine to take a look?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
"Engineering is an Art. The Art of Compromise."