robotics-masters / mm1-hat-seesaw

Examples and firmware for MM1 HAT using SeeSaw with CircuitPython
GNU General Public License v3.0
0 stars 1 forks source link

made changes to the SERVO setting #4

Closed peterpanstechland closed 5 years ago

peterpanstechland commented 5 years ago

add relevant docs, changed servo TC/TCC and WO settings according to DATASHEET section 6 page21-23 "SAMD21G"

wallarug commented 5 years ago

Hi Peter,

Which timers did you change in this pull request?

peterpanstechland commented 5 years ago

Maybe I was looking at the old config file.But now i realised you are using the F(TCC) column for the timer settings, I am getting a bit confused with E(TC/TCC) and F(TCC) column of the "PORT Function table on page 21-23". I think they both should be working, but if yours are not working, then this could be a reference for change the timer settings. BTW in my "board_config_peter.h" file I removed the ADC pins settings which needs to be put back... // SERVO_1 PB10 #define CONFIG_TIMER_PWM_OUT0 1 #define CONFIG_TIMER_PWM_OUT0_TC TC5 #define CONFIG_TIMER_PWM_OUT0_TCC NOT_ON_TCC #define CONFIG_TIMER_PWM_OUT0_WO 0 #define CONFIG_TIMER_PWM_OUT0_PIN (32 + 10) //PB10

// SERVO_2 PB11 #define CONFIG_TIMER_PWM_OUT1 1 #define CONFIG_TIMER_PWM_OUT1_TC TC5 #define CONFIG_TIMER_PWM_OUT1_TCC NOT_ON_TCC #define CONFIG_TIMER_PWM_OUT1_WO 1 #define CONFIG_TIMER_PWM_OUT1_PIN (32 + 11) //PB11

// SERVO_3 PA20 #define CONFIG_TIMER_PWM_OUT2 1 #define CONFIG_TIMER_PWM_OUT2_TC TC4 #define CONFIG_TIMER_PWM_OUT2_TCC NOT_ON_TCC #define CONFIG_TIMER_PWM_OUT2_WO 0 #define CONFIG_TIMER_PWM_OUT2_PIN 20

// SERVO_4 PA21 #define CONFIG_TIMER_PWM_OUT3 1 #define CONFIG_TIMER_PWM_OUT3_TC TC4 #define CONFIG_TIMER_PWM_OUT3_TCC NOT_ON_TCC #define CONFIG_TIMER_PWM_OUT3_WO 1 #define CONFIG_TIMER_PWM_OUT3_PIN 21

This UART TX RX setting has some problem, we needs to find out later today if we need to change the hardware. I upload Crickit HAT schematic img file as reference in the /DOC folder

#define CONFIG_SERCOM_UART_PIN_TX (32 + 23) //PB23 #define CONFIG_SERCOM_UART_PIN_RX (32 + 22) //PB22 #define CONFIG_SERCOM_UART_PAD_TX UART_TX_PAD_3 #define CONFIG_SERCOM_UART_PAD_RX SERCOM_RX_PAD_2

wallarug commented 5 years ago

Thanks Peter.

Check out Issue #1 for updates regarding Serial Port Issues.

For reference, I have been using the Google Spreadsheet for all the port mappings.

https://docs.google.com/spreadsheets/d/1rpH0nZSlkhPdS35Ojbh2NDnJAMc2b4suQPsDXuRWyP4/edit#gid=210616078

image