📄 serial.lst
字号:
\ 000048 2E53 ADD.W #0x2, R14
\ 00004A 1C42.... MOV.W &xCharsForTx, R12
\ 00004E B012.... CALL #xQueueReceive
236 sTHREEmpty = pdFALSE;
\ 000052 8243.... MOV.W #0x0, &sTHREEmpty
237 U1TXBUF = cOutChar;
\ 000056 D24102007F00 MOV.B 0x2(SP), &0x7f
\ 00005C 2153 ADD.W #0x2, SP
238 }
239 }
240 }
241 portEXIT_CRITICAL();
\ ??xSerialPutChar_1:
\ 00005E 8293.... CMP.W #0x0, &usCriticalNesting
\ 000062 0624 JEQ ??xSerialPutChar_2
\ 000064 B253.... ADD.W #0xffff, &usCriticalNesting
\ 000068 8293.... CMP.W #0x0, &usCriticalNesting
\ 00006C 0120 JNE ??xSerialPutChar_2
\ 00006E 32D2 EINT
242
243 return pdPASS;
\ ??xSerialPutChar_2:
\ 000070 1C43 MOV.W #0x1, R12
\ 000072 2153 ADD.W #0x2, SP
\ 000074 3040.... BR #?Epilogue3
244 }
245 /*-----------------------------------------------------------*/
246
247 #ifdef MSP_ROWLEY_RB_PORT
248
249 /* Serial interrupt service routines for the RB port. */
250
251 /*
252 * UART RX interrupt service routine.
253 */
254 #pragma vector=UART1RX_VECTOR
\ In segment CODE, align 2
255 __interrupt void vRxISR( void )
\ vRxISR:
256 {
\ 000000 0D12 PUSH.W R13
\ 000002 0C12 PUSH.W R12
\ 000004 0F12 PUSH.W R15
\ 000006 0E12 PUSH.W R14
\ 000008 2183 SUB.W #0x2, SP
257 signed portCHAR cChar;
258
259 /* Get the character from the UART and post it on the queue of Rxed
260 characters. */
261 cChar = U1RXBUF;
\ 00000A D1427E000000 MOV.B &0x7e, 0x0(SP)
262
263 if( xQueueSendFromISR( xRxedChars, &cChar, pdFALSE ) )
\ 000010 0312 PUSH.W #0x0
\ 000012 0E41 MOV.W SP, R14
\ 000014 2E53 ADD.W #0x2, R14
\ 000016 1C42.... MOV.W &xRxedChars, R12
\ 00001A B012.... CALL #xQueueSendFromISR
\ 00001E 2153 ADD.W #0x2, SP
\ 000020 0C93 CMP.W #0x0, R12
\ 000022 0224 JEQ ??vRxISR_0
264 {
265 /*If the post causes a task to wake force a context switch
266 as the woken task may have a higher priority than the task we have
267 interrupted. */
268 taskYIELD();
\ 000024 B012.... CALL #vPortYield
269 }
270 }
\ ??vRxISR_0:
\ 000028 2153 ADD.W #0x2, SP
\ 00002A 3E41 POP.W R14
\ 00002C 3F41 POP.W R15
\ 00002E 3C41 POP.W R12
\ 000030 3D41 POP.W R13
\ 000032 0013 RETI
271 /*-----------------------------------------------------------*/
272
273 /*
274 * UART Tx interrupt service routine.
275 */
276 #pragma vector=UART1TX_VECTOR
\ In segment CODE, align 2
277 __interrupt void vTxISR( void )
\ vTxISR:
278 {
\ 000000 0D12 PUSH.W R13
\ 000002 0C12 PUSH.W R12
\ 000004 0F12 PUSH.W R15
\ 000006 0E12 PUSH.W R14
\ 000008 2182 SUB.W #0x4, SP
279 signed portCHAR cChar;
280 portBASE_TYPE xTaskWoken;
281
282 /* The previous character has been transmitted. See if there are any
283 further characters waiting transmission. */
284
285 if( xQueueReceiveFromISR( xCharsForTx, &cChar, &xTaskWoken ) == pdTRUE )
\ 00000A 0F41 MOV.W SP, R15
\ 00000C 2F53 ADD.W #0x2, R15
\ 00000E 0F12 PUSH.W R15
\ 000010 0E41 MOV.W SP, R14
\ 000012 2E53 ADD.W #0x2, R14
\ 000014 1C42.... MOV.W &xCharsForTx, R12
\ 000018 B012.... CALL #xQueueReceiveFromISR
\ 00001C 2153 ADD.W #0x2, SP
\ 00001E 1C93 CMP.W #0x1, R12
\ 000020 0320 JNE ??vTxISR_0
286 {
287 /* There was another character queued - transmit it now. */
288 U1TXBUF = cChar;
\ 000022 E2417F00 MOV.B 0x0(SP), &0x7f
\ 000026 023C JMP ??vTxISR_1
289 }
290 else
291 {
292 /* There were no other characters to transmit. */
293 sTHREEmpty = pdTRUE;
\ ??vTxISR_0:
\ 000028 9243.... MOV.W #0x1, &sTHREEmpty
294 }
295 }
\ ??vTxISR_1:
\ 00002C 2152 ADD.W #0x4, SP
\ 00002E 3E41 POP.W R14
\ 000030 3F41 POP.W R15
\ 000032 3C41 POP.W R12
\ 000034 3D41 POP.W R13
\ 000036 0013 RETI
\ In segment INTVEC, offset 0x4, root
\ `??vTxISR??INTVEC 4`:
\ 000004 .... DC16 vTxISR
\ In segment INTVEC, offset 0x6, root
\ `??vRxISR??INTVEC 6`:
\ 000006 .... DC16 vRxISR
296
297 #endif
298 /*-----------------------------------------------------------*/
299
300 #ifdef THAT_WHICH_IS_NOT_DEFINED
301
302 /* Serial port interrupts for the alternative port code. */
303
304 void ISRCom1Rx( void )
305 {
306 signed portCHAR cChar;
307
308 /* Get the character from the UART and post it on the queue of Rxed
309 characters. */
310 cChar = U1RXBUF;
311
312 if( xQueueSendFromISR( xRxedChars, &cChar, pdFALSE ) )
313 {
314 /*If the post causes a task to wake force a context switch
315 as the woken task may have a higher priority than the task we have
316 interrupted. */
317 portEXIT_SWITCHING_ISR( pdTRUE );
318 }
319 }
320 /*-----------------------------------------------------------*/
321
322 void ISRCom1Tx( void )
323 {
324 signed portCHAR cChar;
325 portBASE_TYPE xTaskWoken;
326
327 /* The previous character has been transmitted. See if there are any
328 further characters waiting transmission. */
329
330 if( xQueueReceiveFromISR( xCharsForTx, &cChar, &xTaskWoken ) == pdTRUE )
331 {
332 /* There was another character queued - transmit it now. */
333 U1TXBUF = cChar;
334 }
335 else
336 {
337 /* There were no other characters to transmit. */
338 sTHREEmpty = pdTRUE;
339 }
340 }
341
342 #endif
343 /*-----------------------------------------------------------*/
Maximum stack usage in bytes:
Function CSTACK
-------- ------
vRxISR 16
-> xQueueSendFromISR 16
-> vPortYield 14
vTxISR 18
-> xQueueReceiveFromISR 18
xSerialGetChar 10
-> xQueueReceive 10
xSerialPortInitMinimal 20
-> xQueueCreate 20
-> xQueueCreate 20
xSerialPutChar 12
-> xQueueSend 12
-> xQueueReceive 12
Segment part sizes:
Function/Label Bytes
-------------- -----
_A_IE2 1
_A_ME2 1
_A_P3DIR 1
_A_P3SEL 1
_A_U1CTL 1
_A_U1TCTL 1
_A_U1RCTL 1
U1MCTL 1
U1BR0 1
U1BR1 1
U1RXBUF 1
U1TXBUF 1
xRxedChars 2
xCharsForTx 2
sTHREEmpty 2
xSerialPortInitMinimal 268
xSerialGetChar 42
xSerialPutChar 120
vRxISR 52
vTxISR 56
??vTxISR??INTVEC 4 2
??vRxISR??INTVEC 6 2
538 bytes in segment CODE
12 bytes in segment DATA16_AN
6 bytes in segment DATA16_Z
4 bytes in segment INTVEC
538 bytes of CODE memory
0 bytes of CONST memory (+ 4 bytes shared)
6 bytes of DATA memory (+ 12 bytes shared)
Errors: none
Warnings: 1
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -