Hot answers tagged

10 votes
Accepted

Transmitting from PC via USART to MCU working but very slow

an AVR ATmega MCU sitting on a breadboard, running at 8 MHz with the internal oscillator. This is likely to be your problem. This Atmel application note (source) suggests that an uncalibrated ...
Graham Nye's user avatar
  • 3,875
6 votes

Transmitting from PC via USART to MCU working but very slow

So you are using the internal oscillator. This is most likely the issue. You don't say which AVR you are using, but generally, internal oscillators on AVRs are not accurate enough for UART. At least ...
Justme's user avatar
  • 138k
4 votes

STM32 communication

Transmitting sizeof(txbuf) number of bytes is almost certainly a bug. The "nan" etc garbage likely comes from sending uninitialized parts of the buffer ...
Lundin's user avatar
  • 18.7k
3 votes
Accepted

FTDI FT234XD not recognized

The diodes are completely unsuitable for high speed data lines such as 12Mbps USB. They are also unidirectional so they don't protect from negative ESD. The diodes seem to have capacitance beyond ...
Justme's user avatar
  • 138k
3 votes

Is it okay to call a UART “RS-232” if it doesn’t respect voltage levels specified in the RS-232 standard?

You are correct, those 0/5 V levels are not 'RS232' physical layer, which uses up to +/- 15 V. Many people say RS232, when they mean UART, the protocol, regardless of which physical layer is used to ...
Neil_UK's user avatar
  • 162k
2 votes

STM32 communication

The nan output you see means "Not a Number" and can occur for a wide number of reasons when floating point numbers "go wrong". (...
Attie's user avatar
  • 237
2 votes

Is it okay to call a UART “RS-232” if it doesn’t respect voltage levels specified in the RS-232 standard?

No, it is not OK to call an UART as RS-232, because they are two completely different things, located at different layer on OSI model for networking. RS-232 would be the physical layer, and UART would ...
Justme's user avatar
  • 138k
2 votes

STM32 - HAL_UART_Receive first byte is always zero

As brhans mentioned, the problem was that after reset, an empty 0x00 byte came into the buffer and caused every next frame to be shifted by 1 byte - the first byte was the last byte from the previous ...
block3r's user avatar
  • 41
1 vote

STM32 communication

Your code starts data reception via interrupts, but immediately after starting the reception, even without receiving any data, you are trying to convert nothing that has been received into three ...
Justme's user avatar
  • 138k
1 vote

Internal RC oscillator for reliable UART

By itself, the MCU internal oscillator has 2% tolerance over large operating temperature and voltage range. And, under ideal conditions, the bit sampling can be half a bit off at the stop bit. In ...
Justme's user avatar
  • 138k
1 vote

Digital signal routing for EMI/EMC

The 'best way' to do anything for EMC is very nuanced, and the answer will always be some form of "it depends". It's incredibly dependent on routing, and other board-specific constraints, ...
LordTeddy's user avatar
  • 2,090

Only top scored, non community-wiki answers of a minimum length are eligible