Error in code generated by IOMUX tool for iMX6SDL using USDHC

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Error in code generated by IOMUX tool for iMX6SDL using USDHC

1,169 Views
marcocontenti
Contributor II

I was trying to generate pin-muxing code for a custom board capable to use both iMX6DQ and iMX6SDL CPU flavors.

I had no problems building the code for iMX6DQ, but got a few undefined symbols when trying to compile for iMX6SDL, namely:

HW_IOMUXC_USDHC1_CARD_CLK_IN_SELECT_INPUT_WR

HW_IOMUXC_USDHC2_CARD_CLK_IN_SELECT_INPUT_WR

HW_IOMUXC_USDHC4_CARD_CLK_IN_SELECT_INPUT_WR

(this happen because I am only using USDHC interfaces 1, 2 and 4)

These symbols are not defined in the headers generated, however the register is listed in the iMX6SDL manual, with just one valid setting (the other is reserved), which is not the default, so it seems that setting it would be required. Interestingly, these registers aren't there in the iMX6DQ manual. Actually, I was a bit surprised to find a daisy-chain setting for SD clock signals that are output-only,

So, one of the following must be true:

1. Setting these registers is not required, then the lines of code referencing them shouldn't have been generated, nor should the input selection be available in the relevant "registers" page

2. Setting these registers is required, then the relevant definitions should be present in the generated headers

In either case, this is a bug to be fixed in the IOMUX tool. I think it may be rather simple to fix, and was wondering why isn't it possible to access the source code, so that users may submit patches themselves when they find a bug or create an enhancement (I have some in mind that could make the tool more powerful and easier to use...).

For now, I chose option 1 and commented out the extra lines in order to compile the code. Please tell me if I'm wrong.

Thanks and regards,

Marco

Labels (2)
Tags (2)
5 Replies

866 Views
marcocontenti
Contributor II

I'm sort of answering myself. At least I have found a workaround. Just when checking the iMX6 Platform SDK (v.1.1.0) source tree, which contains IOMUX generated files for some evaluation platforms, I realized that the regsiomuxc.h file in there is different and contains the missing declarations, so replacing the file generated by IOMUX with that from the Platform SDK solves the problem. Obviously, this still ought to be fixed on IOMUX.

FINAL ANSWER: I was actually using IOMUX version 3.4.0.3, which is still available for download from the Freescale website as stand-alone. The latest version 3.4.0.4 fixes the issue. IOMUX version 3.4.0.4 is contained in the iMX6 Platform SDK (I didn't check if it's in any other package as well), but if you look for IOMUX itself you will find an outdated version.

Marco

866 Views
jimmychan
NXP TechSupport
NXP TechSupport

Which BSP are you using?

0 Kudos

866 Views
marcocontenti
Contributor II

The problem does not depend on the BSP or OS used, you can even run the Platform SDK on bare metal.

All the symbols needed to compile the files generated should be in the header files in the sdk\include\mx6sdl\registers folder, also generated by the tool, but these symols are missing.

0 Kudos

866 Views
jimmychan
NXP TechSupport
NXP TechSupport

In Linux BSP, all the iomux setting of pins are defined in arch/arm/plat-mxc/include/mach/iomux-mx6q.h (for i.MX6Q). So, if I want to use different function of iomux pin, I will modify/add  the name of the iomux pin in arch/arm/mach-mx6/board-mx6q_sabresd.h (e.g. for the SabreSD board).

0 Kudos

866 Views
marcocontenti
Contributor II

Of course I know that, my problem was with the interactive IOMUX tool. As you can see from my other post, it was just an issue with an outdated version still available for download.

The IOMUX tool is very powerful and prevents making mistakes, but could be made much better with two key improvements:

- make daisy-chain (SELECT_INPUT) automatic with pin selection, as it is now in the Linux headers you mention

- allow for multiple device options (DQ and SDL which have the same BGA layout) on the same board in one design

The great advantage with IOMUX is having one reference source of information for many tasks.

Marco

0 Kudos