documentation
documentation copied to clipboard
BCM2711: AUX_MU_IER_REG bit positions wrong?
Latest BCM2711 Peripherals documentation (Jan 18 2022) states the following about AUX_MU_IER_REG
(when DLAB=0
) :
Bit | Name | Description | Type | Reset |
---|---|---|---|---|
1 | Enable receive | If this bit is set the interrupt line is asserted whenever the receive FIFO holds at least 1 byte. If this bit is clear no receive interrupts are generated. | RW | 0x0 |
0 | Enable transmit | If this bit is set the interrupt line is asserted whenever the transmit FIFO is empty. If this bit is clear no transmit interrupts are generated. | RW | 0x0 |
Poking around, it seems to me like this is not the case - the bit numbers are backwards.
Setting bit 1 in a code that expects an interrupt when a key is pressed in an uart console leaves me with IRQ 125 storming the CPU. Setting bit 0 has the correct behavior - it fires an interrupt only once, when I press the key. The code clears the FIFO and nothing else happens.
Am I misreading something here or is this a documentation bug?
This seems to be a documentation bug, dating back to the BCM2835 documentation: https://elinux.org/BCM2835_datasheet_errata#p12
Bits 1:0 are swaped. bit 0 is receive interrupt and bit 1 is transmit.
You can find an updated unofficial version of the BCM2835 documentation here: https://github.com/raspberrypi/documentation/issues/325#issuecomment-362877591
ping @pelwell ?
The kernel headers agree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/tree/include/uapi/linux/serial_reg.h#n27 Since interrupts are enabled for ttyS0 and it seems to work, bit 0 must be receive and bit 1 transmit.
Thanks @pelwell.
@lurch I'll assign this one to you as backlog for next time we update the BCM2711 Peripherals document.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This is low priority, but should remain open until the "next time we update the BCM2711 Peripherals document".
Ignore - wrong thread.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Still in backlog.