Usb serial (#1648)

* enabled usb clock
* added usb stack to application
* fixed pll0usb clock setup
* implemented serial usb handshake
* implemented serial communication
* integrated chibios shell
* implemented device reset
* implemented enter dfu mode
* implemented hackrf mode command
* implemented flash command
* implemented memory manipulation
* implemented button control
* fixed mode change
* improved reset behavior
* implemented directory commands
* implemented file commands
* improved data communication
* refactorings
This commit is contained in:
Bernd Herzog 2023-12-17 17:20:35 +01:00 committed by GitHub
parent 2ccda5aebd
commit 6069145b68
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
30 changed files with 1894 additions and 8 deletions

View file

@ -70,6 +70,7 @@ lcd::ILI9341 display;
I2C i2c0(&I2CD0);
SPI ssp1(&SPID2);
portapack::USBSerial usb_serial;
si5351::Si5351 clock_generator{
i2c0, hackrf::one::si5351_i2c_address};
@ -368,7 +369,7 @@ static void shutdown_base() {
*
* XTAL_OSC = powered down
*
* PLL0USB = powered down
* PLL0USB = XTAL, 480 MHz
* PLL0AUDIO = GP_CLKIN, Fcco=491.52 MHz, Fout=12.288 MHz
* PLL1 =
* OG: GP_CLKIN * 10 = 200 MHz
@ -464,6 +465,8 @@ bool init() {
/* Remove /2P divider from PLL1 output to achieve full speed */
cgu::pll1::direct();
usb_serial.initialize();
i2c0.start(i2c_config_fast_clock);
chThdSleepMilliseconds(10);