Nov 28, 2018
06:20 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nov 28, 2018
06:20 PM
It looks like there is a bug in the HW_Init code in "Dave/Generated/ECAT_SSC/xmc_eschw.c"
The gpio_config and port_control structures are not being fully initialized. This results in the gpio_config.output_level variable being assigned a random stack value.
When gpio_config.output_level is used to initialize the ECAT gpios in XMC_GPIO_Init() it assigns garbage stack values into the OMR register.
port->OMR = (uint32_t)config->output_level << pin;
UINT16 HW_Init(void)
{
uint8_t i;
XMC_ECAT_PORT_CTRL_t port_control;
XMC_GPIO_CONFIG_t gpio_config;
memset(&port_control, 0, sizeof(port_control)); // <-- add this line
memset(&gpio_config, 0, sizeof(gpio_config)); // <-- add this line
============================
DAVE Version: 4.4.2
ECAT_SSC APP Version: 4.0.22
The gpio_config and port_control structures are not being fully initialized. This results in the gpio_config.output_level variable being assigned a random stack value.
When gpio_config.output_level is used to initialize the ECAT gpios in XMC_GPIO_Init() it assigns garbage stack values into the OMR register.
port->OMR = (uint32_t)config->output_level << pin;
UINT16 HW_Init(void)
{
uint8_t i;
XMC_ECAT_PORT_CTRL_t port_control;
XMC_GPIO_CONFIG_t gpio_config;
memset(&port_control, 0, sizeof(port_control)); // <-- add this line
memset(&gpio_config, 0, sizeof(gpio_config)); // <-- add this line
============================
DAVE Version: 4.4.2
ECAT_SSC APP Version: 4.0.22
1 Reply
Nov 29, 2018
11:12 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nov 29, 2018
11:12 PM
Hi,
Thanks for the feedback we will correct it in the next release.
Regards,
Jesus
Thanks for the feedback we will correct it in the next release.
Regards,
Jesus