mirror of https://github.com/commaai/panda.git
and fixed a UART noise bug
This commit is contained in:
parent
1066c2d1b0
commit
9e2d49e225
|
@ -23,7 +23,6 @@
|
|||
#include "drivers/usb.h"
|
||||
//#include "drivers/uart.h"
|
||||
|
||||
void uart_init(USART_TypeDef *u, int baud) {}
|
||||
int puts(const char *a) { return 0; }
|
||||
void puth(unsigned int i) {}
|
||||
|
||||
|
|
|
@ -431,8 +431,12 @@ int main() {
|
|||
puts(is_entering_bootmode ? " ESP wants bootmode\n" : " no bootmode\n");
|
||||
gpio_init();
|
||||
|
||||
// enable main uart
|
||||
uart_init(USART2, 115200);
|
||||
// enable main uart if it's connected
|
||||
if (has_external_debug_serial) {
|
||||
// WEIRDNESS: without this gate around the UART, it would "crash", but only if the ESP is enabled
|
||||
// assuming it's because the lines were left floating and spurious noise was on them
|
||||
uart_init(USART2, 115200);
|
||||
}
|
||||
|
||||
#ifdef PANDA
|
||||
// enable ESP uart
|
||||
|
|
|
@ -140,9 +140,6 @@ void soft_flasher_start() {
|
|||
set_gpio_alternate(GPIOA, 12, GPIO_AF10_OTG_FS);
|
||||
GPIOA->OSPEEDR = GPIO_OSPEEDER_OSPEEDR11 | GPIO_OSPEEDER_OSPEEDR12;
|
||||
|
||||
// enable main uart
|
||||
uart_init(USART2, 115200);
|
||||
|
||||
// flasher
|
||||
spi_init();
|
||||
|
||||
|
|
Loading…
Reference in New Issue