This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hello
the latte tool automatically creates the AFE system parameter struct file "afe7903Parameters.c" besides the log file. Unfortunately, this output file is not usable. The are a lot of bugs in the output file like with the brackets ({,[ or ], }) or the data format for parameters like "FRef" are set as double, but an unsigned integer value is expected. The declaration order is not correct.
The python function inside the latte tool whichs creates this c-file needs to be fixed.
We want to configure the Nco frequency dynamically and thus we need the c-function "updateRxNco" inside the CAFE-library. This c-function requires correct defined values inside the system parameter struct "afe79SystemParamsStruct". What is your suggestion of setting those parameters inside the system parameter struct in advance before invoking the "updateRxNco" function? Should we set those parameters with the functions inside "tiAfe79_paramsSetterGetter" file before?
We are using the CAFE library C_libraries_CAFE2p1. This library was uploaded by TI in march 2023 in the secure folder.
Thanks in advance for your help
Best regards, Frederik
Hi Frederik,
I have tested this on my setup and I am able to see the issues with the afeParameters.c document. The first issue about the format is correct the Fref should not be given as a double and it should be given in kHz not MHz. There is also the issue with the brackets.
I am bringing up these issues to our software team and will ask them to update this in the AFE79xx GUI.
I am also working on creating a afeParameters.c that has been tested so that you have a reference. I will work on providing that this week.
Regards,
David Chaparro
Hi Frederik,
After discussing with our software team we found that the best method to get the correct/updated parameter structure is to use the afeDeviceBringupFromMem function to bringup the AFE and also update the parameter structure. The latest version of the CAFE functions, uploaded in the AFE79xx secure folder, will now include this function.
To use the afeDeviceBringupFromMem function you should first use the AFE79xx GUI to generate a configuration file in the hex format. Then you can copy the contents of the hex file and place them in the hostMemRead function, located in the tiAfe79_baseFunc.c file. Now once you call the afeDeviceBringupFromMem function the AFE will be programmed and the parameter structure will be updated based on the hex file contents.
To generate the hex format you can update the logDumpInst.logFormat parameter to equal '0xff'. After running your bringup script you should then be able to find a .hex file in the AFE79xx GUI folder, C:\Users\<>\Documents\Texas Instruments\Afe79xxLatte\lib.
Regards,
David Chaparro
That approach makes it more unpractical to progam the AFE-chip. Before there was the separate spi log file, which can be changed from outside without rebuilding the software. With this approach, everytime we change the configuration file we have to rebuild the software.This fact creates much more overhead at every iteration loop. Therefore we do not have the intention to change the AFE progamming process.
Is there any other approach to fill up the parameter structure, but still using the separated spi log file for programming the AFE chip?
Hi Frederik,
The hex bringup takes care of system parameters population as well so that regenerating the .c and recompilation is not needed. It also does the SPI configuration of the device as needed.
The hex based bringup can be done either
Above 2 methods are equivalent otherwise.
The legacy method using configAfeFromFile, configAfeFromFileFormat0 and configAfeFromFileFormat5 is being depreciated and is no longer recommended.
Regards,
Vijay
Hi Vijay
Correct me if I am wrong.
1. If I want to use method 1 through file. The procedure is similar with configAfeFromFileFormat0. The hex file is created with Latte tool (minimum?: TI-AFE79xx-Latte_V2p5). The created hex file can be stored somewhere in the filesystem of the operating system. We have a linux based operating system on our product. This new function "afeDeviceBringup" must be used to configure the AFE chip. This function requires this hex file and sends the spi commands. Is my assumption correct?
Is this function "afeDeviceBringup" somehow the successor of the function "configAfeFromFileFormat0"?
2. If I go by method 2 throug memory. The created hex values must be placed in the function "hostMemRead" (file: tiAfe79_baseFunc.c). The function "afeDeviceBringupFromMem" (file: tiAfe79_init.c) must be used to confiugre the AFE chip. Is this assumption correct?
Best regards,
Frederik
1. If I want to use method 1 through file. The procedure is similar with configAfeFromFileFormat0. The hex file is created with Latte tool (minimum?: TI-AFE79xx-Latte_V2p5). The created hex file can be stored somewhere in the filesystem of the operating system. We have a linux based operating system on our product. This new function "afeDeviceBringup" must be used to configure the AFE chip. This function requires this hex file and sends the spi commands. Is my assumption correct?
Yes. This is correct. Please use the latest V2p5 versions of AFE79xx_Latte and CAFE79xx.
Is this function "afeDeviceBringup" somehow the successor of the function "configAfeFromFileFormat0"?
The "afeDeviceBringup" function incorporates system parameters population as well. So ‘afeParameters.c’ need not be separately added. Separately adding ‘afeParameters.c’ was needed in the legacy method that uses "configAfeFromFileFormat0.
2. If I go by method 2 throug memory. The created hex values must be placed in the function "hostMemRead" (file: tiAfe79_baseFunc.c). The function "afeDeviceBringupFromMem" (file: tiAfe79_init.c) must be used to confiugre the AFE chip. Is this assumption correct?
Method 2 is for the case where there’s no OS (baremetal implementation). In this case, hex file should be stored in a memory and "hostMemRead" function has to be updated such that when this function is called, it reads from the memory. In the source code provided by TI, hex values are added in "hostMemRead" function for testing purpose. This may not be desired way in final system implantation as this uses limited program memory to store hex file.
Yes. In this method, The function "afeDeviceBringupFromMem" (file: tiAfe79_init.c) must be used to configure the AFE chip.
Regards,
Vijay