Skip to content
Snippets Groups Projects
Commit 3337f1a2 authored by Christos Gentsos's avatar Christos Gentsos
Browse files

PWM: enable complementary outputs in the atmel START project

parent 3945d202
No related branches found
No related tags found
No related merge requests found
......@@ -2,12 +2,17 @@ format_version: '2'
name: My Project
versions:
api: '1.0'
backend: 1.6.148
commit: 605f106ab95776472e3febf2fac2471441fb1816
content: 1.0.1600
content_pack_name: acme-packs-all
backend: 1.7.360
commit: 1e07622763d149970fd8808a8f12ff3b1e84e0d7
content: unknown
content_pack_name: unknown
format: '2'
frontend: 1.6.1881
frontend: 1.7.360
packs_version_avr8: 1.0.1415
packs_version_qtouch: unknown
packs_version_sam: 1.0.1622
version_backend: 1.7.360
version_frontend: ''
board:
identifier: CustomBoard
device: SAMD21G18A-MF
......@@ -319,13 +324,21 @@ drivers:
api: HAL:HPL:GCLK
configuration:
enable_gclk_gen_0: true
enable_gclk_gen_0__externalclock: 1000000
enable_gclk_gen_1: true
enable_gclk_gen_1__externalclock: 1000000
enable_gclk_gen_2: true
enable_gclk_gen_2__externalclock: 1000000
enable_gclk_gen_3: true
enable_gclk_gen_3__externalclock: 1000000
enable_gclk_gen_4: true
enable_gclk_gen_4__externalclock: 1000000
enable_gclk_gen_5: false
enable_gclk_gen_5__externalclock: 1000000
enable_gclk_gen_6: false
enable_gclk_gen_6__externalclock: 1000000
enable_gclk_gen_7: false
enable_gclk_gen_7__externalclock: 1000000
gclk_arch_gen_0_RUNSTDBY: true
gclk_arch_gen_0_enable: true
gclk_arch_gen_0_idc: false
......@@ -521,6 +534,13 @@ drivers:
tc_prescaler: No division
timer_event_control: false
optional_signals:
- identifier: PWM_0:WO/0
pad: PA18
mode: PWM output
configuration: null
definition: Atmel:SAMD21_Drivers:0.0.1::SAMD21G18A-MF::optional_signal_definition::TC3.WO.0
name: TC3/WO/0
label: WO/0
- identifier: PWM_0:WO/1
pad: PA19
mode: PWM output
......@@ -559,6 +579,13 @@ drivers:
tc_prescaler: No division
timer_event_control: false
optional_signals:
- identifier: PWM_1:WO/0
pad: PA22
mode: PWM output
configuration: null
definition: Atmel:SAMD21_Drivers:0.0.1::SAMD21G18A-MF::optional_signal_definition::TC4.WO.0
name: TC4/WO/0
label: WO/0
- identifier: PWM_1:WO/1
pad: PA23
mode: PWM output
......@@ -1120,6 +1147,12 @@ pads:
mode: Digital output
user_label: PA17
configuration: null
PA18:
name: PA18
definition: Atmel:SAMD21_Drivers:0.0.1::SAMD21G18A-MF::pad::PA18
mode: Peripheral IO
user_label: PA18
configuration: null
PA19:
name: PA19
definition: Atmel:SAMD21_Drivers:0.0.1::SAMD21G18A-MF::pad::PA19
......@@ -1138,6 +1171,12 @@ pads:
mode: Digital input
user_label: ADDR2
configuration: null
PA22:
name: PA22
definition: Atmel:SAMD21_Drivers:0.0.1::SAMD21G18A-MF::pad::PA22
mode: Peripheral IO
user_label: PA22
configuration: null
PA23:
name: PA23
definition: Atmel:SAMD21_Drivers:0.0.1::SAMD21G18A-MF::pad::PA23
......
......@@ -31,9 +31,11 @@
#define PA13 GPIO(GPIO_PORTA, 13)
#define PA16 GPIO(GPIO_PORTA, 16)
#define PA17 GPIO(GPIO_PORTA, 17)
#define PA18 GPIO(GPIO_PORTA, 18)
#define PA19 GPIO(GPIO_PORTA, 19)
#define ADDR1 GPIO(GPIO_PORTA, 20)
#define ADDR2 GPIO(GPIO_PORTA, 21)
#define PA22 GPIO(GPIO_PORTA, 22)
#define PA23 GPIO(GPIO_PORTA, 23)
#define PA24 GPIO(GPIO_PORTA, 24)
#define PA25 GPIO(GPIO_PORTA, 25)
......
......@@ -205,6 +205,8 @@ static void TIMER_0_init(void)
void PWM_0_PORT_init(void)
{
gpio_set_pin_function(PA18, PINMUX_PA18E_TC3_WO0);
gpio_set_pin_function(PA19, PINMUX_PA19E_TC3_WO1);
}
......@@ -224,6 +226,8 @@ void PWM_0_init(void)
void PWM_1_PORT_init(void)
{
gpio_set_pin_function(PA22, PINMUX_PA22E_TC4_WO0);
gpio_set_pin_function(PA23, PINMUX_PA23E_TC4_WO1);
}
......
......@@ -1672,6 +1672,12 @@ static struct i2cs_configuration _i2css[] = {
#if CONF_SERCOM_5_I2CS_ENABLE == 1
I2CS_CONFIGURATION(5),
#endif
#if CONF_SERCOM_6_I2CS_ENABLE == 1
I2CS_CONFIGURATION(6),
#endif
#if CONF_SERCOM_7_I2CS_ENABLE == 1
I2CS_CONFIGURATION(7),
#endif
};
#endif
......@@ -1910,7 +1916,7 @@ int32_t _i2c_s_async_set_irq_state(struct _i2c_s_async_device *const device, con
static void _sercom_i2c_s_irq_handler(struct _i2c_s_async_device *device)
{
void * hw = device->hw;
uint32_t flags = hri_sercomi2cm_read_INTFLAG_reg(hw);
uint32_t flags = hri_sercomi2cs_read_INTFLAG_reg(hw);
if (flags & SERCOM_I2CS_INTFLAG_ERROR) {
ASSERT(device->cb.error);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment