Skip to content

Commit

Permalink
firmware: disable internal PROGRAM pull-up
Browse files Browse the repository at this point in the history
There is an external pull-up starting in Cynthion r0.6. The internal
pull-up could cause problems starting in Cynthion r0.7.
  • Loading branch information
mossmann authored and mndza committed Aug 30, 2023
1 parent 0fa24a1 commit a4358d6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions firmware/src/boards/luna_d11/usb_switch.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ void take_over_usb(void)
*/
void switch_control_task(void)
{
#if ((_BOARD_REVISION_MAJOR_ == 0) && (_BOARD_REVISION_MINOR_ < 6))
gpio_set_pin_pull_mode(PROGRAM_BUTTON, GPIO_PULL_UP);
#else
gpio_set_pin_pull_mode(PROGRAM_BUTTON, GPIO_PULL_OFF);
#endif
gpio_set_pin_direction(PROGRAM_BUTTON, GPIO_DIRECTION_IN);
gpio_set_pin_direction(FPGA_INT, GPIO_DIRECTION_IN);
if ((gpio_get_pin_level(PROGRAM_BUTTON) == false) || (gpio_get_pin_level(FPGA_INT) == true)) {
Expand Down

0 comments on commit a4358d6

Please sign in to comment.