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.

Migrating from AIC3204 to AIC3254, using miniDSP, PurePath Studio and the generated config scripts ??

Hi,

After successfully using the AIC3204 in a recent project I am looking into making use of the miniDSP provided with the AIC3254. The PurePath Studio software installation provides a few examples of using the miniDSP, and it appears to generate a configuration .cfg script that may be later used to configure the AIC3254 and the miniDSP engines. I have a couple of questions regarding the AIC3254 and the generated .cfg files.

  1. First, the AIC3254 seems to be pin-to-pin compatible with the AIC3204. Would the current AIC3204 configuration script be 100% compatible with the AIC3254 ? If I programme the AIC3254 with the same settings as I use currently on the AIC3204 will it work without problems ? If not what changes will I need to foresee ?
  2. The PurePath Studio generated configuration file for a basic process flow (from an exemple) appears to include ADC & DAC Coefficient Buffer A + B settings, when the graphical program actually includes none (as far as I know) ? This amounts to a huge number of register settings that I did not really include in the process flow ? Are these really necessary as I would prefer to keep configuration of the AIC3254 to a minimum so as to minimise application boot & start-up time. I've included a part of the generated .cfg script below.
  3. As a general question, is anybody aware of a .cfg parser to convert AIC Script Language commands to C source read/write I2C commands or similar ?


#            --------------------------------------------------------------- page 0 is selected
w 30 00 00
#            # reg[  0][  1] = 0x01    ; Initialize the device through software reset
> 01
#            --------------------------------------------------------------- page 1 is selected
w 30 00 01
#            # reg[  1][  2] = 0xa9    ; Power up AVDD LDO
w 30 02 a9
#            # reg[  1][  1] = 0x08    ; Disable weak AVDD to DVDD connection
w 30 01 08
#            # reg[  1][  2] = 0xa1    ; Enable Master Analog Power Control, AVDD LDO Powered
> a1
#            # reg[  1][ 71] = 0x32    ; Set the input power-up time to 3.1ms
w 30 47 32
#            # reg[  1][123] = 0x05    ; Force REF charging time to 40ms
w 30 7b 05
#            --------------------------------------------------------------- page 8 is selected
w 30 00 08
#             (Bit 31-24) ------------ MSB ADC COEFF No. 0
w 30 08 00
#             (Bit 23-16)
> b7
#             (Bit 15-8)
> 98
#             (Bit 7-0)
> 00
#             (Bit 31-24) ------------ MSB ADC COEFF No. 1
> 7e
#             (Bit 23-16)
> 90
#             (Bit 15-8)
> d0
#             (Bit 7-0)
> 00
#             (Bit 31-24) ------------ MSB ADC COEFF No. 2
> 7b
#             (Bit 23-16)
> 29
#             (Bit 15-8)
> 00
#             (Bit 7-0)
> 00
#             (Bit 31-24) ------------ MSB ADC COEFF No. 3
> 84
#             (Bit 23-16)
> d7
#             (Bit 15-8)
> 00
#             (Bit 7-0)
> 00
#             (Bit 31-24) ------------ MSB ADC COEFF No. 4
> 76
#             (Bit 23-16)
> 52
#             (Bit 15-8)
> 00
#             (Bit 7-0)
> 00
#             (Bit 31-24) ------------ MSB ADC COEFF No. 5
> ff
#             (Bit 23-16)
> ff
#             (Bit 15-8)
> ff
#             (Bit 7-0)
> 00
#             (Bit 31-24) ------------ MSB ADC COEFF No. 6
> 80
#             (Bit 23-16)
> 00
#             (Bit 15-8)
> 00
#             (Bit 7-0)
> 00
#             (Bit 31-24) ------------ MSB ADC COEFF No. 7
> 7f
#             (Bit 23-16)
> ff
#             (Bit 15-8)
> ff
#             (Bit 7-0)
> 00
#             (Bit 31-24) ------------ MSB ADC COEFF No. 8
> 40
#             (Bit 23-16)
> 00
#             (Bit 15-8)
> 00
#             (Bit 7-0)
> 00
#             (Bit 31-24) ------------ MSB ADC COEFF No. 9
> 00
#             (Bit 23-16)
> 00
#             (Bit 15-8)
> 00
#             (Bit 7-0)
> 00
#             (Bit 31-24) ------------ MSB ADC COEFF No. 10
> ff
#             (Bit 23-16)
> 9e
#             (Bit 15-8)
> 00
#             (Bit 7-0)
> 00
#             (Bit 31-24) ------------ MSB ADC COEFF No. 11
> f7
#             (Bit 23-16)
> 10
#             (Bit 15-8)
> 00
#             (Bit 7-0)
> 00
#             (Bit 31-24) ------------ MSB ADC COEFF No. 12
> 26
#             (Bit 23-16)
> f0
#             (Bit 15-8)
> 00
#             (Bit 7-0)
> 00
#             (Bit 31-24) ------------ MSB ADC COEFF No. 13
> 02
#             (Bit 23-16)
> 61
#             (Bit 15-8)
> 00
#             (Bit 7-0)
> 00
#             (Bit 31-24) ------------ MSB ADC COEFF No. 14
> 40
#             (Bit 23-16)
> 02
#             (Bit 15-8)
> 00
#             (Bit 7-0)
> 00
#             (Bit 31-24) ------------ MSB ADC COEFF No. 15
> ff
#             (Bit 23-16)
> fc
#             (Bit 15-8)
> 00
#             (Bit 7-0)
> 00
#             (Bit 31-24) ------------ MSB ADC COEFF No. 16
> ff
#             (Bit 23-16)
> fd
#             (Bit 15-8)
> 00
#             (Bit 7-0)
> 00
#             (Bit 31-24) ------------ MSB ADC COEFF No. 17
> ff
#             (Bit 23-16)
> e5
#             (Bit 15-8)
> 00
#             (Bit 7-0)
> 00
#             (Bit 31-24) ------------ MSB ADC COEFF No. 18
> ff
#             (Bit 23-16)
> a7
#             (Bit 15-8)
> 00
#             (Bit 7-0)
> 00
#             (Bit 31-24) ------------ MSB ADC COEFF No. 19
> ff
#             (Bit 23-16)
> c7
#             (Bit 15-8)
> 00
#             (Bit 7-0)
> 00
#             (Bit 31-24) ------------ MSB ADC COEFF No. 20
> ff
#             (Bit 23-16)
> ce
#             (Bit 15-8)
> 00
#             (Bit 7-0)
> 00
#             (Bit 31-24) ------------ MSB ADC COEFF No. 21
> ff
#             (Bit 23-16)
> fe
#             (Bit 15-8)
> 00
#             (Bit 7-0)
> 00
#             (Bit 31-24) ------------ MSB ADC COEFF No. 22
> fe
#             (Bit 23-16)
> f7
#             (Bit 15-8)
> 00
#             (Bit 7-0)
> 00
#             (Bit 31-24) ------------ MSB ADC COEFF No. 23
> ff
#             (Bit 23-16)
> 46
#             (Bit 15-8)
> 00
#             (Bit 7-0)
> 00
#             (Bit 31-24) ------------ MSB ADC COEFF No. 24
> ff
#             (Bit 23-16)
> 22
#             (Bit 15-8)
> 00
#             (Bit 7-0)
> 00
#             (Bit 31-24) ------------ MSB ADC COEFF No. 25
> ff
#             (Bit 23-16)
> 0f
#             (Bit 15-8)
> 00
#             (Bit 7-0)
> 00
#             (Bit 31-24) ------------ MSB ADC COEFF No. 26
> fa
#             (Bit 23-16)
> 8c
#             (Bit 15-8)
> 00
#             (Bit 7-0)
> 00
#             (Bit 31-24) ------------ MSB ADC COEFF No. 27
> f5
#             (Bit 23-16)
> 08
#             (Bit 15-8)
> 00
#             (Bit 7-0)
> 00
#             (Bit 31-24) ------------ MSB ADC COEFF No. 28
> fd
#             (Bit 23-16)
> 92
#             (Bit 15-8)
> 00
#             (Bit 7-0)
> 00
#             (Bit 31-24) ------------ MSB ADC COEFF No. 29
> f3
#             (Bit 23-16)
> a3
#             (Bit 15-8)
> 00
#             (Bit 7-0)
> 00
#            --------------------------------------------------------------- page 9 is selected
w 30 00 09
#             (Bit 31-24) ------------ MSB ADC COEFF No. 30
w 30 08 03
#             (Bit 23-16)
> b3


Hoping to make an easy transition from the AIC3204 to the AIC3254 with minimal changes, however I understand the miniDSP programming will be another another thing to consider separately.

Thanks in advance, mikm

  • Hi mikm,

    You can download an AIC3204 code into AIC3254 without any problems. So for initial debugging you can use exactly the same code as AIC3204.

    When using PurePath, I would recommend editing the codec configuration for any custom register settings. This can be edited by clicking the framework and opening the SystemSettingsCode found in its Properties.

    To generate a data structure in a header file, you can go to Tools>Options>Build and check "Generate Device Driver Interface". This will generate both a .cfg and a .h. The header file will contain three data structures...the first one contains the low level registers, whereas the other two will contain miniDSP instructions and coefficients. In your MCU, you would load the first data structure array, which also contains 'magic numbers' to jump to the other data structure. Refer to the driver documentation found in the PurePath download location for more information on the magic numbers.

    Regards,

    J-

     

  • J Arbona said:

    Hi mikm,

    You can download an AIC3204 code into AIC3254 without any problems. So for initial debugging you can use exactly the same code as AIC3204.

    When using PurePath, I would recommend editing the codec configuration for any custom register settings. This can be edited by clicking the framework and opening the SystemSettingsCode found in its Properties.

    To generate a data structure in a header file, you can go to Tools>Options>Build and check "Generate Device Driver Interface". This will generate both a .cfg and a .h. The header file will contain three data structures...the first one contains the low level registers, whereas the other two will contain miniDSP instructions and coefficients. In your MCU, you would load the first data structure array, which also contains 'magic numbers' to jump to the other data structure. Refer to the driver documentation found in the PurePath download location for more information on the magic numbers.

    Regards,

    J-

    Hi ! thanks for your quick reply. so basically I can just drop-in the AIC3254 into my current custom board in place of the AIC3204, and use exactly the same codec configuration, PLL, AGC, DRC and get exactly the same result ?

    Also, please confirm, if this is the only way to get going with the mini DSP and purePath (as you suggested with the .h files etc), as I was wanting to actually parse the .cfg files generated and convert them to my customs I2C read/write functions I use with the DSP. So for every   w 30 4f 2E    command (for instance) in the config file, I parse and replace with my I2C write register function (with the equivalent register and data etc.). This would be more in-line with current configuration I am using on the AIC3204 ... The other method may be more elegant but not directly following from my current .c file on the DSP....

    The structures you describe, you say contain some "magic numbers" ?!? This I do not follow completely and is this necessary if I use my method ? Can the raw .cfg file be simply parsed and converted to C-code ? which is bringing me to the other question that you did not perhaps notice, namely : The PurePath Studio generated configuration file for a basic process flow (from an exemple) appears to include ADC & DAC Coefficient Buffer A + B settings, when the graphical program actually includes none (as far as I know) ? This amounts to a huge number of register settings being generated by PurePath in the .cfg file that I did not really include in the process flow ? Are these really necessary  and what do they actually configure really ? None of these I have used in my current configuration of the AIC3204 and I presume they are default values. I would prefer to keep configuration of the AIC3254 to a minimum so as to minimise application boot & start-up time as there are other peripherals being configured besides the codec ??

    Thanks, mikm

  • Hi,

    Hi ! thanks for your quick reply. so basically I can just drop-in the AIC3254 into my current custom board in place of the AIC3204, and use exactly the same codec configuration, PLL, AGC, DRC and get exactly the same result ?

    - Correct.

    Also, please confirm, if this is the only way to get going with the mini DSP and purePath (as you suggested with the .h files etc), as I was wanting to actually parse the .cfg files generated and convert them to my customs I2C read/write functions I use with the DSP. So for every   w 30 4f 2E    command (for instance) in the config file, I parse and replace with my I2C write register function (with the equivalent register and data etc.). This would be more in-line with current configuration I am using on the AIC3204 ... The other method may be more elegant but not directly following from my current .c file on the DSP....

    - You could parse the .cfg. The .cfg is actually in-line code which will program the entire device from software reset to power-up.

    The structures you describe, you say contain some "magic numbers" ?!? This I do not follow completely and is this necessary if I use my method ? Can the raw .cfg file be simply parsed and converted to C-code ? which is bringing me to the other question that you did not perhaps notice, namely : The PurePath Studio generated configuration file for a basic process flow (from an exemple) appears to include ADC & DAC Coefficient Buffer A + B settings, when the graphical program actually includes none (as far as I know) ? This amounts to a huge number of register settings being generated by PurePath in the .cfg file that I did not really include in the process flow ? Are these really necessary  and what do they actually configure really ? None of these I have used in my current configuration of the AIC3204 and I presume they are default values. I would prefer to keep configuration of the AIC3254 to a minimum so as to minimise application boot & start-up time as there are other peripherals being configured besides the codec ??

    - The 'magic numbers' are not necessary to understand if you use the .cfg file. The C-RAM Buffers A+B are used by the framework.  You can compare the values in the .cfg file with Table 6-7 and 6-4 of the datasheet. If they are the same, then you don't need to rewrite them. However, if the .cfg has a coefficient that differs from these tables, then it should be changed to the .cfg file outputs. With an empty project (i.e. just the framework), there is only 5 coefficients (5 in buff. A and 5 in buff. B) for each miniDSP. Placing the interpolator only on miniDSP_D will require 44 coefficients...these coefficients are used for certain functions of the interpolator. As coefficient requirements grow, so will the code.

    Regards,

    J-