Browse Source

Removed output drain due to buffers

Per Mårtensson 3 years ago
parent
commit
5169b38ccd
1 changed files with 14 additions and 2 deletions
  1. 14 2
      sw/src/main.cpp

+ 14 - 2
sw/src/main.cpp

@@ -321,7 +321,8 @@ void setup()
   //Check which image to load
   switchImage();
 
-  
+/*
+Should not be used due to buffers
   // set up OTYPER for open drain on SCSI pins of PA and PB
   // PA 0-7, 11-14
   uint32_t oTypeA_And = 0x000078FF;
@@ -330,13 +331,24 @@ void setup()
   GPIOA->regs->OTYPER = (GPIOA->regs->OTYPER & oTypeA_And) | oTypeA_Or;
 
   // PB 1, 11 are not used
-  uint32_t oTypeB_And = 0x00000802;
+  uint32_t oTypeB_And = 0x00000000;
   // PB 0, 2-10, 12-15 are used for SCSI, set open drain
   uint32_t oTypeB_Or = 0x0000F7FD;
   GPIOB->regs->OTYPER = (GPIOB->regs->OTYPER & oTypeB_And) | oTypeB_Or;
 
 
+  // PD 8-15 are not used
+  uint32_t oTypeD_And = 0b00000000000000001111111100000000;
+  // PD 0-7 are used for SCSI, set open drain
+  uint32_t oTypeD_Or  = 0b00000000000000000000000011111111;
+  GPIOD->regs->OTYPER = (GPIOD->regs->OTYPER & oTypeD_And) | oTypeD_Or;
 
+  // PE 1, 7-15 are not used
+  uint32_t oTypeE_And = 0b00000000000000001111111110000010;
+  // PE 0,2-6 are used for SCSI, set open drain
+  uint32_t oTypeE_Or  = 0b00000000000000000000000001111101;
+  GPIOD->regs->OTYPER = (GPIOE->regs->OTYPER & oTypeE_And) | oTypeE_Or;
+*/
   // Turn off the output port
   SCSI_TARGET_INACTIVE()