Before edundo help commit

This commit is contained in:
Nicolas Trimborn
2021-08-25 16:36:12 +02:00
parent 6f1ca06830
commit fadb312ed1
13 changed files with 234 additions and 221 deletions

View File

@@ -597,8 +597,8 @@ drivers:
dmac_evosel_7: Event generation disabled
dmac_evosel_8: Event generation disabled
dmac_evosel_9: Event generation disabled
dmac_lvl_0: Channel priority 3
dmac_lvl_1: Channel priority 2
dmac_lvl_0: Channel priority 0
dmac_lvl_1: Channel priority 0
dmac_lvl_10: Channel priority 0
dmac_lvl_11: Channel priority 0
dmac_lvl_12: Channel priority 0
@@ -882,8 +882,8 @@ drivers:
eic_arch_enable_irq_setting11: false
eic_arch_enable_irq_setting12: false
eic_arch_enable_irq_setting13: false
eic_arch_enable_irq_setting14: true
eic_arch_enable_irq_setting15: true
eic_arch_enable_irq_setting14: false
eic_arch_enable_irq_setting15: false
eic_arch_enable_irq_setting2: false
eic_arch_enable_irq_setting3: false
eic_arch_enable_irq_setting4: false
@@ -1755,16 +1755,16 @@ drivers:
functionality: I2C
api: HAL:Driver:I2C_Master_Sync
configuration:
i2c_master_advanced: false
i2c_master_advanced: true
i2c_master_arch_dbgstop: Keep running
i2c_master_arch_inactout: Disabled
i2c_master_arch_inactout: 5-6 SCL cycle time-out(50-60us)
i2c_master_arch_lowtout: false
i2c_master_arch_mexttoen: false
i2c_master_arch_runstdby: false
i2c_master_arch_sdahold: 300-600ns hold time
i2c_master_arch_sdahold: 50-100ns hold time
i2c_master_arch_sexttoen: false
i2c_master_arch_trise: 215
i2c_master_baud_rate: 400000
i2c_master_baud_rate: 100000
optional_signals: []
variant:
specification: SDA=0, SCL=1
@@ -2430,9 +2430,10 @@ pads:
SPI2_SS:
name: PA14
definition: Atmel:SAME51_Drivers:0.0.1::SAME51J19A-MF::pad::PA14
mode: Peripheral IO
mode: Digital output
user_label: SPI2_SS
configuration: null
configuration:
pad_initial_level: High
SPI2_MISO:
name: PA15
definition: Atmel:SAME51_Drivers:0.0.1::SAME51J19A-MF::pad::PA15

View File

@@ -225,7 +225,7 @@
// <i> Defines the arbitration level for this channel
// <id> dmac_lvl_0
#ifndef CONF_DMAC_LVL_0
#define CONF_DMAC_LVL_0 3
#define CONF_DMAC_LVL_0 0
#endif
// <q> Channel Event Output
@@ -449,7 +449,7 @@
// <i> Defines the arbitration level for this channel
// <id> dmac_lvl_1
#ifndef CONF_DMAC_LVL_1
#define CONF_DMAC_LVL_1 2
#define CONF_DMAC_LVL_1 0
#endif
// <q> Channel Event Output

View File

@@ -749,7 +749,7 @@
// <e> Interrupt 14 Settings
// <id> eic_arch_enable_irq_setting14
#ifndef CONF_EIC_ENABLE_IRQ_SETTING14
#define CONF_EIC_ENABLE_IRQ_SETTING14 1
#define CONF_EIC_ENABLE_IRQ_SETTING14 0
#endif
// <q> External Interrupt 14 Filter Enable
@@ -798,7 +798,7 @@
// <e> Interrupt 15 Settings
// <id> eic_arch_enable_irq_setting15
#ifndef CONF_EIC_ENABLE_IRQ_SETTING15
#define CONF_EIC_ENABLE_IRQ_SETTING15 1
#define CONF_EIC_ENABLE_IRQ_SETTING15 0
#endif
// <q> External Interrupt 15 Filter Enable

View File

@@ -20,7 +20,7 @@
// <i> I2C Bus clock (SCL) speed measured in Hz
// <id> i2c_master_baud_rate
#ifndef CONF_SERCOM_0_I2CM_BAUD
#define CONF_SERCOM_0_I2CM_BAUD 400000
#define CONF_SERCOM_0_I2CM_BAUD 100000
#endif
// </h>
@@ -28,7 +28,7 @@
// <e> Advanced
// <id> i2c_master_advanced
#ifndef CONF_SERCOM_0_I2CM_ADVANCED_CONFIG
#define CONF_SERCOM_0_I2CM_ADVANCED_CONFIG 0
#define CONF_SERCOM_0_I2CM_ADVANCED_CONFIG 1
#endif
// <o> TRise (ns) <0-300>
@@ -71,7 +71,7 @@
// <i> Defines if inactivity time-out should be enabled, and how long the time-out should be
// <id> i2c_master_arch_inactout
#ifndef CONF_SERCOM_0_I2CM_INACTOUT
#define CONF_SERCOM_0_I2CM_INACTOUT 0x0
#define CONF_SERCOM_0_I2CM_INACTOUT 0x1
#endif
// <o> SDA Hold Time (SDAHOLD)
@@ -82,7 +82,7 @@
// <i> Defines the SDA hold time with respect to the negative edge of SCL
// <id> i2c_master_arch_sdahold
#ifndef CONF_SERCOM_0_I2CM_SDAHOLD
#define CONF_SERCOM_0_I2CM_SDAHOLD 0x2
#define CONF_SERCOM_0_I2CM_SDAHOLD 0x1
#endif
// <q> Run in stand-by

View File

@@ -150,7 +150,7 @@
<AcmeProjectActionInfo Action="File" Source="bosch_sensor/bno055.c" IsConfig="false" Hash="XPPPZU9L/b9idSrKk8NVQA" />
<AcmeProjectActionInfo Action="File" Source="bosch_sensor/bno055.h" IsConfig="false" Hash="CwBdWSXvpYKMOGYgDpbcHQ" />
<AcmeProjectActionInfo Action="File" Source="main.c" IsConfig="false" Hash="k0AH7j+BrmdFhBPzCCMptA" />
<AcmeProjectActionInfo Action="File" Source="driver_init.c" IsConfig="false" Hash="be/M5vy49HKRV6Tq8qbQqg" />
<AcmeProjectActionInfo Action="File" Source="driver_init.c" IsConfig="false" Hash="xU5TmlKAmzuNcrynaR/xqA" />
<AcmeProjectActionInfo Action="File" Source="driver_init.h" IsConfig="false" Hash="mFwQVZxJZ+vquTfAxVSFAg" />
<AcmeProjectActionInfo Action="File" Source="atmel_start_pins.h" IsConfig="false" Hash="6fDzwmi32d15DysbSDGNEQ" />
<AcmeProjectActionInfo Action="File" Source="examples/driver_examples.h" IsConfig="false" Hash="91mEn8bnzq7OcOmWxtLjLA" />
@@ -212,15 +212,15 @@
<AcmeProjectActionInfo Action="File" Source="config/hpl_adc_config.h" IsConfig="true" Hash="XAOTvk5xMalucgzL/ILTWw" />
<AcmeProjectActionInfo Action="File" Source="config/hpl_ccl_config.h" IsConfig="true" Hash="Q1yijLwNXjFOsGrwEEma+g" />
<AcmeProjectActionInfo Action="File" Source="config/hpl_cmcc_config.h" IsConfig="true" Hash="bmtxQ8rLloaRtAo2HeXZRQ" />
<AcmeProjectActionInfo Action="File" Source="config/hpl_dmac_config.h" IsConfig="true" Hash="KrByLQAm3PkkyOF4POgwZg" />
<AcmeProjectActionInfo Action="File" Source="config/hpl_eic_config.h" IsConfig="true" Hash="xKw8xm4k4XPALg++/jSPcw" />
<AcmeProjectActionInfo Action="File" Source="config/hpl_dmac_config.h" IsConfig="true" Hash="SAFPygs5WrLFsCGH+k+xAQ" />
<AcmeProjectActionInfo Action="File" Source="config/hpl_eic_config.h" IsConfig="true" Hash="xGTWc3ZL07K/tP/YF7YzPw" />
<AcmeProjectActionInfo Action="File" Source="config/hpl_evsys_config.h" IsConfig="true" Hash="/3bNiu/UgpvPbmvfRA+w3g" />
<AcmeProjectActionInfo Action="File" Source="config/hpl_gclk_config.h" IsConfig="true" Hash="fvc5nhPTGTNHCTNlzs6nhA" />
<AcmeProjectActionInfo Action="File" Source="config/hpl_mclk_config.h" IsConfig="true" Hash="pxBzoQXTG66x4dbzVzxteg" />
<AcmeProjectActionInfo Action="File" Source="config/hpl_osc32kctrl_config.h" IsConfig="true" Hash="HgvzEqDUH4jq/syjj/+G+Q" />
<AcmeProjectActionInfo Action="File" Source="config/hpl_oscctrl_config.h" IsConfig="true" Hash="Uje5LXAS+nQpGryt9t0fYA" />
<AcmeProjectActionInfo Action="File" Source="config/hpl_port_config.h" IsConfig="true" Hash="rMTNR+5FXtu+wfT1NbfRRA" />
<AcmeProjectActionInfo Action="File" Source="config/hpl_sercom_config.h" IsConfig="true" Hash="JZVS/MInf5fXoR+i2tUrDA" />
<AcmeProjectActionInfo Action="File" Source="config/hpl_sercom_config.h" IsConfig="true" Hash="Vm7v7a4F40Wzv368v+pLEw" />
<AcmeProjectActionInfo Action="File" Source="config/hpl_tc_config.h" IsConfig="true" Hash="T93Kr6C+WDuufZob89oPeg" />
<AcmeProjectActionInfo Action="File" Source="config/hpl_tcc_config.h" IsConfig="true" Hash="2LU7afZ/3Yx7FE2KzF9dSQ" />
<AcmeProjectActionInfo Action="File" Source="config/peripheral_clk_config.h" IsConfig="true" Hash="6eU7+fZNEY4RDC37iHjvJQ" />
@@ -389,6 +389,7 @@
<armgcc.compiler.directories.IncludePaths>
<ListValues>
<Value>%24(PackRepoDir)\arm\CMSIS\5.4.0\CMSIS\Core\Include\</Value>
<Value>%24(PackRepoDir)\atmel\SAME51_DFP\1.1.139\include</Value>
<Value>../Config</Value>
<Value>../</Value>
<Value>../examples</Value>
@@ -413,7 +414,6 @@
<Value>../hpl/tcc</Value>
<Value>../hri</Value>
<Value>../bosch_sensor</Value>
<Value>%24(PackRepoDir)\atmel\SAME51_DFP\1.1.139\include</Value>
</ListValues>
</armgcc.compiler.directories.IncludePaths>
<armgcc.compiler.optimization.PrepareFunctionsForGarbageCollection>True</armgcc.compiler.optimization.PrepareFunctionsForGarbageCollection>
@@ -440,6 +440,7 @@
<armgcc.assembler.general.IncludePaths>
<ListValues>
<Value>%24(PackRepoDir)\arm\CMSIS\5.4.0\CMSIS\Core\Include\</Value>
<Value>%24(PackRepoDir)\atmel\SAME51_DFP\1.1.139\include</Value>
<Value>../Config</Value>
<Value>../</Value>
<Value>../examples</Value>
@@ -464,13 +465,13 @@
<Value>../hpl/tcc</Value>
<Value>../hri</Value>
<Value>../bosch_sensor</Value>
<Value>%24(PackRepoDir)\atmel\SAME51_DFP\1.1.139\include</Value>
</ListValues>
</armgcc.assembler.general.IncludePaths>
<armgcc.assembler.debugging.DebugLevel>Default (-g)</armgcc.assembler.debugging.DebugLevel>
<armgcc.preprocessingassembler.general.IncludePaths>
<ListValues>
<Value>%24(PackRepoDir)\arm\CMSIS\5.4.0\CMSIS\Core\Include\</Value>
<Value>%24(PackRepoDir)\atmel\SAME51_DFP\1.1.139\include</Value>
<Value>../Config</Value>
<Value>../</Value>
<Value>../examples</Value>
@@ -495,7 +496,6 @@
<Value>../hpl/tcc</Value>
<Value>../hri</Value>
<Value>../bosch_sensor</Value>
<Value>%24(PackRepoDir)\atmel\SAME51_DFP\1.1.139\include</Value>
</ListValues>
</armgcc.preprocessingassembler.general.IncludePaths>
<armgcc.preprocessingassembler.debugging.DebugLevel>Default (-Wa,-g)</armgcc.preprocessingassembler.debugging.DebugLevel>

View File

@@ -509,6 +509,16 @@ void system_init(void)
// GPIO on PA14
gpio_set_pin_level(SPI2_SS,
// <y> Initial level
// <id> pad_initial_level
// <false"> Low
// <true"> High
true);
// Set pin direction to output
gpio_set_pin_direction(SPI2_SS, GPIO_DIRECTION_OUT);
gpio_set_pin_function(SPI2_SS, GPIO_PIN_FUNCTION_OFF);
// GPIO on PA25

View File

@@ -109,8 +109,8 @@ void SERCOM1_3_Handler()
//tx_buffer[31] += 1;
DMAC->Channel[0].CHCTRLA.reg |= DMAC_CHCTRLA_ENABLE;
DMAC->Channel[1].CHCTRLA.reg |= DMAC_CHCTRLA_ENABLE;
//DMAC->Channel[0].CHCTRLA.reg |= DMAC_CHCTRLA_ENABLE;
//DMAC->Channel[1].CHCTRLA.reg |= DMAC_CHCTRLA_ENABLE;
//_dma_enable_transaction(CONF_SERCOM_1_RECEIVE_DMA_CHANNEL, false);
//_dma_enable_transaction(CONF_SERCOM_1_TRANSMIT_DMA_CHANNEL, false);
@@ -234,6 +234,7 @@ int main(void)
DMAC->Channel[0].CHCTRLA.reg |= DMAC_CHCTRLA_ENABLE;
DMAC->Channel[1].CHCTRLA.reg |= DMAC_CHCTRLA_ENABLE;
//_dma_enable_transaction(CONF_SERCOM_1_RECEIVE_DMA_CHANNEL, false);
//_dma_enable_transaction(CONF_SERCOM_1_TRANSMIT_DMA_CHANNEL, false);
@@ -241,7 +242,7 @@ int main(void)
//ORIENTATION_SENSOR_0_init();
angle_sensor_init();
//angle_sensor_init();
/* Replace with your application code */
@@ -267,10 +268,10 @@ int main(void)
//*M3_Joint_abs_position = angles[0];
//*M4_Joint_abs_position = angles[1];
int16_t* angles;
angles = read_angle();
*M3_Joint_abs_position = degrees(angles[0]);
*M4_Joint_abs_position = degrees(angles[1]);
//int16_t* angles;
//angles = read_angle();
//*M3_Joint_abs_position = degrees(angles[0]);
//*M4_Joint_abs_position = degrees(angles[1]);
volatile int y = 0;