Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
air
Level 2
Level 2
First like given 50 sign-ins 10 questions asked

hello.

 

Please inquire about SAR DMA interrupt.

I tested it using the test_adc1() function in adc_core.c .

* condition

 - target : CY8C6136

 - SAR : 4 channel

 - DMA : channel 0

 

* case-1

 #define TEST 1 // Normal operation such as interrupt generation

* case-2

 #define TEST 0

  -> DMA works well

  -> Interrupt related service routine address/register normal -> Do not go to interrupt routine

 

INIT.pngADDRESS.png

 

It has to be used like case-2 for compatibility with existing projects, and has been progressing without any problems in other MCUs.

All peripheral configurations are as in case-2, and other interrupts are judged in the same situation.

I want to attach an iar project that contains only the relevant content, but it cannot be attached due to a capacity problem, so only some files are attached.

 

In this regard, please review which part should be checked.

 

thank you

 

 

/*******************************************************************************

* Function Name:

********************************************************************************

* Summary:

*

* Parameters:

*

* Return:

*******************************************************************************/

void test_adc1(void)

{

#if TEST == 1

  in_adc1_init();

  

  while(1)

  {

    Cy_SAR_StartConvert(SAR, CY_SAR_START_CONVERT_SINGLE_SHOT);

    Cy_SysLib_Delay(1000);

  }

#else

  adc_core_init();

  

  while(1)

  {

    adc_conversion_start(ADC_CH_1);

    Cy_SysLib_Delay(1000);

  }

#endif

}

 

 

 

 

0 Likes
2 Replies
PandaS
Moderator
Moderator
Moderator
100 solutions authored 5 likes given 250 sign-ins

Hi @air ,

Let me have a  high level understanding of your application and where you are facing the issue.

If I understood correct,  You are trying to capture 4 Channel SAR ADC data over DMA Channel 0. But when you try to do so, it doesn't enter the ISR.

If the that functionality is achieved through normal interrupts it is working. Please confirm, it would help me provide a better suggestion.

 

Thanks and regards

Sobhit

0 Likes
lock attach
Attachments are accessible only for community members.
air
Level 2
Level 2
First like given 50 sign-ins 10 questions asked

 Hello,

I attatch IAR project file.

If pvPortMalloc(sizeof(adc_buffer_t)) is removed within adc_core_init(), DMA interrupt works normally.

Please review the FreeRTOSConfig.h file to see if there are any problems with the heap_5 setting.

This project is a migration project of the existing ST MCU, and the previous settings were used.

 thanks.

0 Likes