AnsweredAssumed Answered

c write into asm

Question asked by ml.michal on Nov 12, 2013
Latest reply on Nov 12, 2013 by ml.michal
Hi All,

please somebody help me to write this c code into asm:

void EXTI9_5_IRQHandler(void)
{
  /* Clear the EXTI line pending bit */
  //EXTI_ClearITPendingBit( EXTI_Line8 );
  EXTI->PR = EXTI_Line8;

  NVIC->ICER[ EXTI9_5_IRQn >> 0x05] = (uint32_t)0x01 << ( EXTI9_5_IRQn & (uint8_t)0x1F);

  uint32_t i32=ADC_BUFFER_FULL_LEN; // actual value 20001
  ADC_Buffer_ptr1=(uint8_t *)ADC_Buffer;

  do
  {
    *(ADC_Buffer_ptr1++)=*(((uint8_t *)&(GPIOF->IDR))+1); // GPIO_Pins [15:8] into Buffer
  }
  while( (i32--) > 0 );
}

compiler is unrolling "while" into 7 steps always and i think that if the code will be written in asm then will not be unrolled ...

Thanks for all replies,

Kind regards

Outcomes