Hi All,
I have been updating my developed examples from SDK_S32K14X_11 (S32SDK_S32K14x_BETA_1.9.0) to SDK_S32K1xx_13 (S32SDK_S32K1xx_BETA_2.9.0) and I found out that there might be a possible bug in Processor Expert while generating code for dmaController.
DmaController uses edma_channel_config_t structure for configuring each channel.
Below you can see both versions SDK_S32K14xx_11 and SDK_S32K1xx_13 (edma_driver.h:287). I have highlighted the issue.
As you can see the generated code (dmaController.c) in SDK_S32K1xx_13 does not include the FEATURE_DMAMUX_AVAILABLE condition to check its compatibility (included in the header edma_driver.h).
It is possible that Processor Expert offer an option to define FEATURE_DMAMUX_AVAILABLE but I have not found it. Sounds to me that the condition should still be in the generated code check for that feature availability, especially if the header file is checking on it too.
Can somebody confirm if this is a known issue?
SDK_S32K14xx_11 (edma_driver.h)
/*!
* @brief The user configuration structure for the an eDMA driver channel.
*
* Use an instance of this structure with the EDMA_DRV_ChannelInit() function. This allows the user to configure
* settings of the EDMA channel with a single function call.
* Implements : edma_channel_config_t_Class
*/
typedef struct {
#if FEATURE_DMA_CHANNEL_GROUP_COUNT > 0x1U
#ifdef FEATURE_DMA_HWV3
edma_group_priority_t groupPriority; /*!< eDMA group priority. Used while eDMA
group arbitration is set to fixed priority. */
#endif
#endif
edma_channel_priority_t channelPriority; /*!< eDMA channel priority - only used when channel
arbitration mode is 'Fixed priority'. */
uint8_t virtChnConfig; /*!< eDMA virtual channel number */
dma_request_source_t source; /*!< Selects the source of the DMA request for this channel */
edma_callback_t callback; /*!< Callback that will be registered for this channel */
void * callbackParam; /*!< Parameter passed to the channel callback */
} edma_channel_config_t;
edma_channel_config_t dmaController1Chn0_Config = {
.channelPriority = EDMA_CHN_DEFAULT_PRIORITY,
.virtChnConfig = EDMA_CHN0_NUMBER,
.source = EDMA_REQ_LPUART0_RX,
.callback = NULL,
.callbackParam = NULL
};
SDK_S32K1xx_13 (edma_driver.h)
/*!
* @brief The user configuration structure for the an eDMA driver channel.
*
* Use an instance of this structure with the EDMA_DRV_ChannelInit() function. This allows the user to configure
* settings of the EDMA channel with a single function call.
* Implements : edma_channel_config_t_Class
*/
typedef struct {
#if FEATURE_DMA_CHANNEL_GROUP_COUNT > 0x1U
#ifdef FEATURE_DMA_HWV3
edma_group_priority_t groupPriority; /*!< eDMA group priority. Used while eDMA
group arbitration is set to fixed priority. */
#endif
#endif
edma_channel_priority_t channelPriority; /*!< eDMA channel priority - only used when channel
arbitration mode is 'Fixed priority'. */
uint8_t virtChnConfig; /*!< eDMA virtual channel number */
#ifdef FEATURE_DMAMUX_AVAILABLE
dma_request_source_t source; /*!< Selects the source of the DMA request for this channel */
#endif
edma_callback_t callback; /*!< Callback that will be registered for this channel */
void * callbackParam; /*!< Parameter passed to the channel callback */
bool enableTrigger; /*!< Enables the periodic trigger capability for the DMA channel. */
} edma_channel_config_t;
dmaController.c
edma_channel_config_t dmaController1Chn0_Config = {
.channelPriority = EDMA_CHN_DEFAULT_PRIORITY,
.virtChnConfig = EDMA_CHN0_NUMBER,
.source = EDMA_REQ_LPUART0_RX,
.callback = NULL,
.callbackParam = NULL,
.enableTrigger = false
};