Post Go back to editing

Running More than one Background Device Drivers in Embedded Linux

Category: Software
Product Number: xc7z030iffg676-2l
Software Version: Vivado 2019.1, Petalinux 2019.1 , Linux Default Kernel (19-R2), U-boot-xlnx(19.1)

We have to run an audio driver 'exe file' (audio.exe) in the background of the operating system, along with a shell script (script.sh) that can read the RSSI value and can write 1/0 to the GPIO value on the basis of RSSI value. We first run an ./audio.exe & and then run ./script.sh & to control the receiver using the value of GPIO, which is based on RSSI. 

Both of these files have while loop that is continuously monitoring the RSSI value, writing 1/0 to gpio value, and also handling the uart data in audio.exe.

The problem rises on running the script.sh, it causes audio distortion. If we manually write 1/0 to the gpio, or do any kind of changes, there is no disruption in the audio. But if we run that shell script, it causes problem because of while loop.

Any help in this regard is highly appreciated. 

  • Can you provide more context on the system itself? What ADI component are you interfacing with? What are the update rates of the two scripts you have?

    -Travis

  • The board we are using is a custom board having Zynq-7030 chip and AD9361 transceiver on it. We are using UART in our design to communicate between PL to PS and vice versa. To control the PS-PL communication, we have to execute that audio drivers (audio.exe). These audio drivers read and write data on uart interface. The execution of these drivers alone is not causing any kind of problem and the results are according to our expectations. 

    Currently, we are aiming to use an AXI-GPIO in our design. We are controlling the gpio in PS by writing its value to either 1 or 0. The purpose of script.sh is to monitor the RSSI value continuously (through a while loop) and then according to that, writing 1/0 value to the gpio. 

    Writing 1/0 to the gpio by ourselves is not causing any problem. Also, displaying RSSI value (cat in_volt0_rssi) is also not causing any problem.

    Running of this shell script, script.sh, is causing distortion in the audio data. 

    Update rate of the executables is might be in micro-seconds. We exactly have no idea about it. We will find it and will share it as soon as possible. 

    Kindly provide any solution on the basis of above mentioned facts on urgent basis. 

    Thanks.

  • We are using UART in our design to communicate between PL to PS and vice versa. To control the PS-PL communication, we have to execute that audio drivers (audio.exe).

    This seems very strange. Why not use AXI?

    Update rate of the executables is might be in micro-seconds. We exactly have no idea about it. We will find it and will share it as soon as possible. 

    Are you maxing out the ARM cores you are writing so often? What is the processor utilization when running these scripts together?

    -Travis

  • I could not check the processor utilization when running scripts in the serial terminal. We are using custom uart for our design that has to transmit more bits than the AXI offers. 

    Thanks