- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
I have a simple polled UART application which is not working as I expect:
rs232_rx_control = IORD_ALTERA_AVALON_UART_STATUS(UART_BASE); if (rs232_rx_control & ALTERA_AVALON_UART_STATUS_RRDY_MSK) { *pBuffer = IORD_ALTERA_AVALON_UART_RXDATA(UART_BASE); return 1; } The baud rate is 57600 and I am generating the characters manually, so speed isn't the problem. The problem is that RRDY is never being set. The characters are being received into RXDATA. They overwrite the previous received character. I don't see any receiver overruns, framing errors or detected breaks. Transmitting characters is no problem for me.Link copiado
6 Respostas
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
Maybe looked at the others bits of the status register (PE, FE, BRK) to see if the error doesn't come from here.
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
Solved this myself.
I hadn't initialised the UART control register. I guess the default is to enable interrupts. With all interrupts disabled the code worked as expected.- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
Solved this myself.
I hadn't initialised the UART control register. I guess the default is to enable interrupts. With all interrupts disabled the code worked as expected.- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
hey bmarshall,
I'm facing the same problem, can you tell me how you initialised the UART control register and disabled interrupts. Thanx, Marek- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
I've been on vacation.
I no longer have this code. Current version is interrupt driven.- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
No problem, I ended up understanding your previous post. By disabling the interrupts in the control register I got the code to work as expected.
Regards, Marek
Responder
Opções do tópico
- Subscrever fonte RSS
- Marcar tópico como novo
- Marcar tópico como lido
- Flutuar este Tópico para o utilizador atual
- Marcador
- Subscrever
- Página amigável para impressora