Post Go back to editing

ADRV9009 Linux log file location

Category: Software
Product Number: ADRV9009
Software Version: 2019_R2

Hello

We have custom hardware with three ADRV9009 devices. We use the ADI IIO kernel drivers to control the ADRV9009 devices. The design is working for the most part. However, under certain circumstances when setting the LO frequency, the ADR9009 ARM hangs and produces the following dmesg output:

[ 288.518808] adrv9009 spi1.2: ERROR: 247: TALISE_waitArmCmdStatus() failed due to thrown ARM error. ARM time out

[ 288.528998] adrv9009 spi1.2: adrv9009_set_radio_state: failed [ 288.534782] adrv9009 spi1.2: adrv9009_set_radio_state: failed

[ 290.604279] adrv9009 spi1.2: ERROR: 179: ARM Mailbox Busy. Command not executed in TALISE_sendArmCommand()

[ 292.677449] adrv9009 spi1.2: ERROR: 179: ARM Mailbox Busy. Command not executed in TALISE_sendArmCommand()

[ 294.750656] adrv9009 spi1.2: ERROR: 179: ARM Mailbox Busy. Command not executed in TALISE_sendArmCommand()

[ 294.760313] adrv9009 spi1.2: adrv9009_set_radio_state: failed [ 294.766096] adrv9009 spi1.2: adrv9009_set_radio_state: failed

[ 294.771873] adrv9009 spi1.2: ERROR: 439: TALISE_setRfPllFrequency() : Invalid rfpllLoFreq, rfPllLoFreq - TxProfileRFBW/2 must be > 0 (DC)

[ 296.877856] adrv9009 spi1.2: ERROR: 179: ARM Mailbox Busy. Command not executed in TALISE_sendArmCommand()

[ 297.888570] adrv9009 spi1.1: ERROR: 247: TALISE_waitArmCmdStatus() failed due to thrown ARM error. ARM time out

[ 297.898754] adrv9009 spi1.1: adrv9009_set_radio_state: failed

[ 297.904530] adrv9009 spi1.1: adrv9009_set_radio_state: failed

I am going to post a question relating to this issue on the ADRV9009 design support forum.

My question here relates to the ADRV9009 HAL logging. 

I have seen in the user guide support for logging with the setLogLevel and writeToLog API. 

When this fault happens, I would like to view the log file to see if there is anything useful that could help me diagnose what is going wrong. I have looked through the Linux Talise IIO device driver but I can't seem to find where the actual log file is defined. As a result, I don't know where to look for the log file.

Questions:

1) Does the Linux Talise IIO device driver support logging of ADRV9009 transactions to a log file?

2) Is there something I need to enable or add to the Linux Talise IIO driver to start the logging to a file?

3) If so, where will the log file be located?

Thank you in advance.

Gavin

Thread Notes

  • 1) Does the Linux Talise IIO device driver support logging of ADRV9009 transactions to a log file?

    2) Is there something I need to enable or add to the Linux Talise IIO driver to start the logging to a file?

    3) If so, where will the log file be located?

    The driver only supports logging to kernel messages.

    You can enable additional log levels by editing:

    phy->linux_hal.logLevel = ADIHAL_LOG_ERR | ADIHAL_LOG_WARN;

    in adrv9009_probe().

    Add ADIHAL_LOG_MSG or ADIHAL_LOG_SPI if you want to see more internal API calls or the entire SPI messages.

    -Michael

  • Hello Michael

    Thank you for the prompt response.

    So I updated that line in the probe function to the following:

    phy->linux_hal.logLevel = ADIHAL_LOG_ERR | ADIHAL_LOG_WARN | ADIHAL_LOG_MSG | ADIHAL_LOG_SPI;

    I also added a printk message to confirm that the driver was being built with this change.

    I booted the hardware. I saw the printk message that I had added.  I navigated to /sys/bus/iio/devices/iio:device4. I executed

    cat out_altvoltage0_TRX_LO_frequency

    dmesg

    I was expecting an SPI transaction to go read the LO frequency but nothing extra was printed out by dmesg.

    I then changed the LO frequency with the following:

    echo 100000000 > out_altvoltage0_TRX_LO_frequency

    dmesg

    Again, I was definitely expecting an SPI transaction to take place to set the LO frequency of the ADRV9009, but no additional messages were printed out by dmesg.

    I must be missing something here. Surely setting the LO frequency results in one or more SPI transactions to the hardware and these should be logged by adding the ADIHAL_LOG_SPI?

    Thanks

  • Hello Michael

    I see that it is possible to define TALISE_VERBOSE which will give more debug printout to dmesg.

    Do you have any advice as to why I am not seeing additional printout by adding ADIHAL_LOG_SPI to the log level?

    Do you know if there is any way to get more information about what is happening inside the ARM of the ADRV9009? I have hit a road block with the original problem and without more knowledge of what is happening in the ARM, I am not confident of being able to fix the problem.

    Thank you.

  • Hello ADRV9009 Software Support Team

    I see the latest ADRV9009 ARM firmware version is 6.2.1. I am running 6.0.2. Is there any change log that describes what was fixed / changed between 6.0.2 and 6.2.1?

    I am wondering if the ARM Timeout issue that I am seeing when change LO frequency was possibly fixed in 6.2.1. Before going through the process of updating, it would be helpful to know if there is a possibility that the issue has been fixed. I assume that updating to the latest ARM version will also require updating the rest of the project infrastructure: HDL firmware and Linux device drivers

    Also, please can you answer my previous question as to whether it is possible to get more information about what is happening inside the ADR9009 ARM.

    This problem has been going on for a while now and a prompt response would be greatly appreciated.

    Thank you.

  • I added more debug print outs to the ADRV9009 IIO device driver. The ARM timeout happens when the driver attempts to put the ADRV9009 into the radio off state before setting the LO frequency. 
    I tried updating to the latest ARM firmware (6.2.1) and the behaviour was the same.

    I wasn't able to achieve what I wanted to with the ADRV9009 Linux log file and instead got the same result by adding extra print outs around function where the problem was happening.