• slider image 325
  • slider image 326
  • slider image 327
  • slider image 328
  • slider image 329
  • slider image 330
:::


Browsing this Thread:   1 Anonymous Users






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


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

發表於: 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

發表於: 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 ); }

發表於: 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://mu.microchip.com/page/tmu
http://www.microchip.com.tw/modules/tadnews/page.php?ncsn=2&nsn=41
http://elearning.microchip.com.tw/modules/tad_link/index.php?cate_sn=1
http://www.microchip.com/
http://www.microchip.com/treelink
http://www.microchipdirect.com/
https://page.microchip.com/APAC-PrefCenters-TW.html
https://www.youtube.com/user/MicrochipTechnology
http://www.microchip.com.cn/newcommunity/index.php?m=Video&a=index&id=103
https://www.microchip.com/development-tools/
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/
[ more... ]

教育訓練中心

課程 - 台北教育訓練中心
課程 - 新竹教育訓練中心
課程 - 高雄教育訓練中心
教育訓練中心介紹
購買 - 實驗工具
臺灣實驗板介紹與資源