Skip to content

Commit

Permalink
Support for Hardware Version 2.2 (#27)
Browse files Browse the repository at this point in the history
* Remapped all pins for v2 boards

* Moving DMA Stream for SPI3 to prevent overlap with I2C2 and correcting LED colors

* Moving old imu driver

* Adjusting constants/config for new boards

* Driver Updates (Not working fully yet but avoids address collision)

* GDB Multiarch replaced specific gdb versions

* Removing voltage readings

* Tools update for v2 boards

* Fixed accelerometer and temperature sensor drivers

Signed-off-by: Luca Della Vedova <luca@openrobotics.org>

* Fixed ADC parameters for new board revision

Signed-off-by: Luca Della Vedova <luca@openrobotics.org>

* WIP: Fixed ADC structure for new ADC channels

Signed-off-by: Luca Della Vedova <luca@openrobotics.org>

* More consistency in ADC channels

Signed-off-by: Luca Della Vedova <luca@openrobotics.org>

* Recorder updates

* Fixed inverted ADC readings

Signed-off-by: Luca Della Vedova <luca@openrobotics.org>

* Changed to center aligned PWM.

While the frequency constant was doubled because of the center aligned feature the PWM will still be at 20kHz frequency

Signed-off-by: Luca Della Vedova <luca@openrobotics.org>

* Calibration script fixes (add sleep and increase timeout)

Signed-off-by: Luca Della Vedova <luca@openrobotics.org>

* Updated recorder element count

* Changed ADC sampling to be relative to falling edge instead of PWM center

Signed-off-by: Luca Della Vedova <luca@openrobotics.org>

* Revert "Changed ADC sampling to be relative to falling edge instead of PWM center"

This reverts commit a06cbe1.

* Removed PWM limit, halved update rate from timer

* More conservative delay for bootloader exit

Signed-off-by: Luca Della Vedova <luca@openrobotics.org>

* Fixing more tools

* Fixed current readings for low PWM duty cycles

Clamped PWM duty cycle between 0.05 and 0.95, added simultaneous
sampling of all the current channels

Signed-off-by: Luca Della Vedova <luca@openrobotics.org>

* Getting gravity to match output

* imu test now produces correct gravity scaled vector

Co-authored-by: Luca Della Vedova <luca@openrobotics.org>
  • Loading branch information
gbalke and luca-della-vedova authored Mar 3, 2020
1 parent af91ad5 commit 2965ecc
Show file tree
Hide file tree
Showing 39 changed files with 806 additions and 569 deletions.
2 changes: 1 addition & 1 deletion bootloader/src/peripherals.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ void setStatusLEDColor(uint32_t color) {
}

void setCommsActivityLED(bool on) {
palWritePad(GPIOA, GPIOA_LED_Y, !on);
palWritePad(GPIOB, GPIOB_LED_Y, !on);
}

void setRS485TransmitMode(bool transmit) {
Expand Down
12 changes: 6 additions & 6 deletions common/board.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
ChibiOS - Copyright (C) 2006..2017 Giovanni Di Sirio
ChibiOS - Copyright (C) 2006..2019 Giovanni Di Sirio
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -115,7 +115,7 @@ void __early_init(void) {
bool sdc_lld_is_card_inserted(SDCDriver *sdcp) {

(void)sdcp;
/* TODO: Fill the implementation.*/
/* CHTODO: Fill the implementation.*/
return true;
}

Expand All @@ -125,7 +125,7 @@ bool sdc_lld_is_card_inserted(SDCDriver *sdcp) {
bool sdc_lld_is_write_protected(SDCDriver *sdcp) {

(void)sdcp;
/* TODO: Fill the implementation.*/
/* CHTODO: Fill the implementation.*/
return false;
}
#endif /* HAL_USE_SDC */
Expand All @@ -137,7 +137,7 @@ bool sdc_lld_is_write_protected(SDCDriver *sdcp) {
bool mmc_lld_is_card_inserted(MMCDriver *mmcp) {

(void)mmcp;
/* TODO: Fill the implementation.*/
/* CHTODO: Fill the implementation.*/
return true;
}

Expand All @@ -147,14 +147,14 @@ bool mmc_lld_is_card_inserted(MMCDriver *mmcp) {
bool mmc_lld_is_write_protected(MMCDriver *mmcp) {

(void)mmcp;
/* TODO: Fill the implementation.*/
/* CHTODO: Fill the implementation.*/
return false;
}
#endif

/**
* @brief Board-specific initialization code.
* @todo Add your board-specific code, if any.
* @note You can add your board-specific code here.
*/
void boardInit(void) {

Expand Down
570 changes: 284 additions & 286 deletions common/board.h

Large diffs are not rendered by default.

Loading

0 comments on commit 2965ecc

Please sign in to comment.