Need to use DQS pin in RT1052 for I2C after boot

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

Need to use DQS pin in RT1052 for I2C after boot

1,184 Views
sagonzal
Contributor III

I really need help guys, with a custom board using i.MXRT 1052 in MBGA package.

The issue is that I can NOT use I2C on pins GPIO_SD_B1_05 and GPIO_SD_B1_04 since bootloader configures is as DQS (data strobe) for the FlexSPI even when I do NOT need or want to use than pin.

The hardware scenario is as follows: a single IS25WP064A-JBLE connected without DQS (data strobe) and only internal RAM (no external ram) and I want to use QSPI flash at low speed, 30MHz or 60MHz.

So the question here is: can I change bootloader? How to tell the ROM bootloader to use my NOR configuration?

 

I tried changing the bootloader: In the 'evkbimxrt1050_flexspi_nor_config.c' I can change this behaviour quite easily by doing:

const flexspi_nor_config_t
hyperflash_config =
{
.memConfig =
{
.tag = FLEXSPI_CFG_BLK_TAG,
.version = FLEXSPI_CFG_BLK_VERSION,
.readSampleClksrc=kFlexSPIReadSampleClk_LoopbackInternally,
.csHoldTime = 3u,
.csSetupTime = 3u,
.columnAddressWidth = 3u,
// Enable DDR mode, Wordaddassable, Safe configuration, Differential clock
.controllerMiscOption =
(1u << kFlexSpiMiscOffset_DdrModeEnable) | (1u << kFlexSpiMiscOffset_WordAddressableEnable) |
(1u << kFlexSpiMiscOffset_SafeConfigFreqEnable) | (1u << kFlexSpiMiscOffset_DiffClkEnable),
.deviceType = kFlexSpiDeviceType_SerialNOR,
.sflashPadType = kSerialFlash_1Pad,

...

 

As you can see, 'kFlexSPIReadSampleClk_LoopbackInternally' is avoiding the use of the pin. But this does NOT change anything.

I'm using NXP MCU boot Utility v4.10 tool to download the code our external flash and this works fine (see the attached image to see the config used). Our program boot and works, but I2C does not work in those pins. Sadly, I use a lot of pins ( 4PWMs and 4 encoders) and I cannot change the I2C pins since the board is manufactured.

Any help is greatly appreciated?

 

Labels (1)
Tags (1)
0 Kudos
Reply
2 Replies

1,132 Views
Omar_Anguiano
NXP TechSupport
NXP TechSupport

Hello
I hope you are well.

With kFlexSPIReadSampleClk_LoopbackInternally you are saving the use of DQS pad. If the configuration were kFlexSPIReadSampleClk_LoopbackFromDqsPad then you will need to reserve the DQS to be floating but this is not the case.
After boot you will need to set the pins, so this suggests that the issue could be on the I2C setting.
Are you using ConfigTools to configure the pins?

Best regards,
Omar

0 Kudos
Reply

1,094 Views
sagonzal
Contributor III
Hi Omar!
Thank you for coming back to me.
Yes, I need to use:
[P2] GPIO_SD_B1_04
[N3] GPIO_SD_B1_05
for I2C

Indeed, I'm using the ConfigTools from MCUXpresso 11.6.1.202210031117 for setting up all the pins.

Please take a look of the scope; in there you will see GPIO_SD_B1_04 without connecting anything to it, that signal is bursting at 130MHz periodically.



I do not think is an issue with the I2C configurations, if I use the 'other' pins:

IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B1_00_LPI2C1_SCL, 1U);
IOMUXC_SetPinMux(IOMUXC_GPIO_AD_B1_01_LPI2C1_SDA, 1U);
IOMUXC_SetPinConfig(IOMUXC_GPIO_AD_B1_00_LPI2C1_SCL, 0xD8B0U);
IOMUXC_SetPinConfig(IOMUXC_GPIO_AD_B1_01_LPI2C1_SDA, 0xD8B0U);

...I2C works fine.

What I need to know is how to change this pin behaviour in the FLASHLOADER; and how to do it?

regards,

Sergio.

0 Kudos
Reply