• slider image 442
  • slider image 477
  • slider image 479
  • slider image 480
  • slider image 481
  • slider image 482
:::


Browsing this Thread:   1 Anonymous Users






Re: atsamc21 usart tx polling mode 問題
#3
中級會員
中級會員


查看用戶資訊
Hi Libra
感謝!!!!!

發表於: 2021/8/2 16:05
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


Re: atsamc21 usart tx polling mode 問題
#2
管理員
管理員


查看用戶資訊
Write可以不用Call back, 沒有執行CallbackRegister()註冊, Write中斷發生時就不會去呼叫.

請參考SAM2001 課程 06 PINMUX & SERCOM - UART Architecture.
http://www.microchip.com.tw/modules/t ... hp?ncsn=2&nsn=41#PageTab7

發表於: 2021/8/2 11:43
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部


atsamc21 usart tx polling mode 問題
#1
中級會員
中級會員


查看用戶資訊
我usart tx 只要polling mode,我將下列這行註冊取消掉,不知這樣做有無要注意的地方? // SERCOM3_USART_WriteCallbackRegister(USART3_Transmit, (uintptr_t) NULL); uint8 _t Txdat[1]; void USART3_Transmit(uintptr_t context) { // USART3_IsTransmitted = true; } void USART3_Receive(uintptr_t context) { USART3_IsReceived = true; } int main() { SERCOM3_USART_ReadCallbackRegister(USART3_Receive, (uintptr_t) NULL); // SERCOM3_USART_WriteCallbackRegister(USART3_Transmit, (uintptr_t) NULL); SERCOM3_USART_Read( USART3_ReceiveData, 1); while (1) { Txdat[0]='O'; SERCOM3_USART_Write(&Txdat[0],1); while( SERCOM3_USART_WriteIsBusy() ); Txdat[0]='K'; SERCOM3_USART_Write(&Txdat[0],1); while( SERCOM3_USART_WriteIsBusy() ); } return ( EXIT_FAILURE ); }

發表於: 2021/7/30 9:36
Twitter Facebook Google Plus Linkedin Del.icio.us Digg Reddit Mr. Wong 頂部







You can view topic.
不可以 發起新主題
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.
You cannot use topic type.
You cannot use HTML syntax.
You cannot use signature.
You cannot create PDF files.
You cannot get print page.

[進階搜尋]


:::

Microchip連結

https://www.facebook.com/microchiptechnologytaiwan/
http://www.microchip.com.tw/modules/tad_uploader/index.php?of_cat_sn=13
https://mu.microchip.com/page/tmu
http://elearning.microchip.com.tw/modules/tad_link/index.php?cate_sn=1
https://page.microchip.com/APAC-PrefCenters-TW.html
http://www.microchip.com/
http://www.microchip.com/treelink
http://www.microchipdirect.com/
http://www.microchip.com.cn/newcommunity/index.php?m=Video&a=index&id=103
http://www.microchip.com.tw/modules/tad_uploader/index.php?of_cat_sn=2
http://www.microchip.com.tw/Data_CD/eLearning/index.html
http://www.microchip.com.tw/RTC/RTC_DVD/
https://www.microchip.com/development-tools/
https://www.youtube.com/user/MicrochipTechnology
[ more... ]

教育訓練中心

!開發工具購買
辦法說明 [業界客戶] [教育單位]
----------------------------------
!校園樣品申請
辦法說明 [教師資格] [學生資格]
----------------------------------