COM1 on Cerbuino

I can’t get COM1 to work on the Cerbuino Bee modules I have. I can set COM1 in the SerialPort constructor and I can open and I can send bytes to it without errors but nothing appears on pins PB6 & PB7. (UART1)

Is it possible to get this to work as I have developed a plug in board and connected this via X2 and I would hate to have to rework the whole design?

@ Dave McLaughlin - On the Cerb boards, the RX pins from COM1 to COM3 are PC7, PA3, and PB11 and the TX pins are PC6, PA2, and PB10. The UART names on the schematic do not map to COM names.

@ Dave McLaughlin - Yes, COM1 is PC7 and PC6 connected to the XBEE Socket.

So I am basically screwed by using PB6 & 7 which are marked as UART1?

Is that mapped to any com port?

@ Dave McLaughlin - Only the pins I mentioned in my post are mapped as COM ports. There are no other ports in the firmware. You may be able to configure and use those pins as a COM port using the Register class – potentially by remapping one of the exist COM ports to those pins if possible. It is not something we have tested or know to work however.

Ah, that might be a way to try this. I am not using the I2C on this as this doesn’t work either (using software) as I used the wrong pins so mapping might work.

I’ll dig out the datasheet tomorrow and see if I can do this.

I can enabled PB6 and 7 to be USART1 and move I2C1 to PB8 & 9 but the underlying firmware doesn’t map anything to USART1

:frowning:

Maybe I can do the UART1 via manipulating the registers. I don’t need high speed just sending 9600 bps data and receive a few characters.

Trying to use the Register class to write to the USART1 registers.

I setup USART6 (COM1) and then read out the values to see what the settings used are and then tried to replicate these (after taking out the interrupt stuff) and I can’t get the values to write to the register. I am using the following to try and write to the SR register.


Register uartSR = new GHI.Processor.Register(0x40011000);
uartSR.Value = 0xC0;
tempReg = uartSR.Value;

tempReg is 0x000 which is the default value of this register. Am I missing something here?

Sorry not a NETMF guy, but do like/use this HW

COM1 != USART1

USART1 is usable via PB6/PB7
You’d need to enable the USART1 clock in APB2 for the registers to work, select AF7 for the pins to mux the signals in AF mode.

USART1 clock probably looks something like this

Register APB2ENR = new GHI.Processor.Register(0x40023844);
APB2ENR.Value = APB2ENR.Value | 0x10;
1 Like

Thanks clive1, that does indeed allow the registers to work and I managed to transmit data. Just need to figure out how to read it now and not lose any characters as there is no interrupt capability.