GPIO, how to reduce delay between every adl_ioWriteSingle()?


#1

Hi,

I would like to use 3 GPIO on Wavecom Q2686 for communication with another microcontroller.

I am using loops to generate proper signals on those lines. This is perform in timer handler:

i=0;
    for ( i = 0;i<1000;i++){
        if (i==999){
            if (flag=!flag)
            {
                adl_ioWriteSingle (GPIO_Handle2, ADL_IO_Q2686_GPIO_22,ADL_IO_HIGH );
                adl_ioWriteSingle (GPIO_Handle1, ADL_IO_Q2686_GPIO_23,ADL_IO_HIGH );
            }
            else
            {     
                adl_ioWriteSingle (GPIO_Handle2, ADL_IO_Q2686_GPIO_22,ADL_IO_LOW );
                adl_ioWriteSingle (GPIO_Handle1, ADL_IO_Q2686_GPIO_23,ADL_IO_LOW );
            }
        }
    }
 i=0;
    for (i = 0;i<1000;i++){
        if (i==999){
            if (flag=!flag)
            {
                adl_ioWriteSingle (GPIO_Handle2, ADL_IO_Q2686_GPIO_22,ADL_IO_HIGH );            
                adl_ioWriteSingle (GPIO_Handle1, ADL_IO_Q2686_GPIO_23,ADL_IO_HIGH );
                
            }
            else {
                adl_ioWriteSingle (GPIO_Handle2, ADL_IO_Q2686_GPIO_22,ADL_IO_LOW );
                adl_ioWriteSingle (GPIO_Handle1, ADL_IO_Q2686_GPIO_23,ADL_IO_LOW );
                
            }
        }
    }
       i=0;
    for ( i = 0;i<1000;i++){
        if (i==999){
            if (flag=!flag){
            adl_ioWriteSingle (GPIO_Handle2, ADL_IO_Q2686_GPIO_22,ADL_IO_HIGH );
            adl_ioWriteSingle (GPIO_Handle1, ADL_IO_Q2686_GPIO_23,ADL_IO_HIGH );  
            }
            else{ 
            adl_ioWriteSingle (GPIO_Handle2, ADL_IO_Q2686_GPIO_22,ADL_IO_LOW );
            adl_ioWriteSingle (GPIO_Handle1, ADL_IO_Q2686_GPIO_23,ADL_IO_LOW );
            }
        }
    }
    i=0;
    for (i = 0;i<1000;i++){
        if (i==999){
            if (flag=!flag){
            adl_ioWriteSingle (GPIO_Handle2, ADL_IO_Q2686_GPIO_22,ADL_IO_HIGH );
            adl_ioWriteSingle (GPIO_Handle1, ADL_IO_Q2686_GPIO_23,ADL_IO_HIGH );
            }
            else{ 
            adl_ioWriteSingle (GPIO_Handle2, ADL_IO_Q2686_GPIO_22,ADL_IO_LOW );
            adl_ioWriteSingle (GPIO_Handle1, ADL_IO_Q2686_GPIO_23,ADL_IO_LOW );
            }
        }
    }

But when I perform one adl_ioWriteSingle() instruction after another I have dealy (~80us). (Please have a look pic below). This is to big delay for my application.
How can I decrease this time delay?

Thanks in advance for answers,