This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

nrf52832 uarte, no intr on setting events_txdrdy

nrf52832dk pca 10040 board

besides ports bits and dir setup and baudrate, etc ...

this is part of my uarte init funct (pDev = 0x40002000)

pDev->TXD.PTR = (uint) TxBuf ;

pDev->TXD.MAXCNT = eTxBuf ; // 1

pDev->RXD.PTR = (uint) RxBuf ;

pDev->RXD.MAXCNT = eRxBuf ; // 6

pDev->TASKS_STARTRX = 1 ;

NVIC_EnableIRQ (UARTE0_UART0_IRQn) ;

the rcv and xmt functs work well in polled mode ... hw should be setup correctly

the rcv isr support also works, means the intrs should be setup correctly

now when i do the following in a test funct called upon button press

pDev->EVENTS_TXDRDY = 1 ;

//uint x = pDev->EVENTS_TXDRDY ;

uint x = *((uint *) 0x4000211c) ;

why is x ... content of EVENTS_TXDRDY now 0 even it has been set a line earlier and no tx isr event

the manual states the following under peripheral interface

Events can be generated by the peripheral even when the event register is set to '1'

i try to kickstart the transmitter so that the tx isr will pick up the char in the dma buf upon a

pDev->TASKS_STARTTX = 1 ;

i realize this is not the ideal way, but it's an initial try to get the tx isr going ... i'm just experimenting with the tx under intrs

the key is to feed the tx isr from a custom fifo one char at the time and what to do to get it to start again, when the fifo was empty

my tx funct should only feed the fifo and if the fifo was empty kickstart the tx isr to pick the data from the fifo

on some nxp chips all i had to do is to disa or ena the tx isr

figuring the low level operation out by looking at the nrf code is way to complex and there is a total lack of simple low level examples

below is a snippet of the sfrs

Read 4 bytes @ address 0x40002000 (Data = 0x00000000) Read 4 bytes @ address 0x40002004 (Data = 0x00000000) Read 4 bytes @ address 0x40002008 (Data = 0x00000000) Read 4 bytes @ address 0x4000200C (Data = 0x00000000) Read 4 bytes @ address 0x4000202C (Data = 0x00000000) Read 4 bytes @ address 0x40002100 (Data = 0x00000001) Read 4 bytes @ address 0x40002104 (Data = 0x00000000) Read 4 bytes @ address 0x40002108 (Data = 0x00000000) Read 4 bytes @ address 0x4000210C (Data = 0x00000000) Read 4 bytes @ address 0x40002110 (Data = 0x00000000) Read 4 bytes @ address 0x4000211C (Data = 0x00000000) Read 4 bytes @ address 0x40002120 (Data = 0x00000000) Read 4 bytes @ address 0x40002124 (Data = 0x00000000) Read 4 bytes @ address 0x40002144 (Data = 0x00000000) Read 4 bytes @ address 0x40002148 (Data = 0x00000000) Read 4 bytes @ address 0x4000214C (Data = 0x00000001) Read 4 bytes @ address 0x40002150 (Data = 0x00000000) Read 4 bytes @ address 0x40002154 (Data = 0x00000000) Read 4 bytes @ address 0x40002158 (Data = 0x00000000) Read 4 bytes @ address 0x40002200 (Data = 0x00000000) Read 4 bytes @ address 0x40002300 (Data = 0x00000110) Read 4 bytes @ address 0x40002304 (Data = 0x00000110) Read 4 bytes @ address 0x40002308 (Data = 0x00000110) Read 4 bytes @ address 0x40002480 (Data = 0x00000000) Read 4 bytes @ address 0x40002500 (Data = 0x00000008) Read 4 bytes @ address 0x40002504 (Data = 0x00000000) Read 4 bytes @ address 0x40002524 (Data = 0x01D60000) Read 4 bytes @ address 0x40002540 (Data = 0x00000000) Read 4 bytes @ address 0x4000256C (Data = 0x00000000)

Related