Hard fault while configuring SEMC with DBI

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

Hard fault while configuring SEMC with DBI

600 Views
thivya_ashokkum
Contributor II

HI there,

I'm trying to add an LCD (ST7789H2) to my project and I configured my SEMC dbi config as follows:

dbi_config.csxPinMux = kSEMC_MUXA8;
dbi_config.address = DBI_START;
dbi_config.memsize_kbytes = 32U*1024;
dbi_config.columnAddrBitNum = kSEMC_Dbi_Colum_9bit;
dbi_config.portSize = kSEMC_PortSize16Bit;
dbi_config.burstLen = kSEMC_Dbi_BurstLen16;

dbi_config.tCsxHold_Ns = 200;
dbi_config.tCsxInterval_Ns = 200;
dbi_config.tCsxSetup_Ns = 200;
dbi_config.tRdxHigh_Ns = 200;
dbi_config.tRdxLow_Ns = 200;
dbi_config.tRdxLow_Ns = 200;
dbi_config.tWexLow_Ns = 200;

I use the base address as A0000000 but when I try to write an 8-bit value as below

 #define DBI_START  0xA0000000U//(0xA0000000U)

uint16_t *my_dbi = (uint16_t *)DBI_START; // DBI Base address. */

my_dbi[0x10000] = Reg;

I always hit a hard fault (Imprecise bus data error). Am I using the wrong address? Any help will be appreciated.

Labels (1)
0 Kudos
3 Replies

509 Views
jeremyzhou
NXP Employee
NXP Employee

Hi THIVYA ASHOK KUMAR ,

Thank you for your interest in NXP Semiconductor products and
for the opportunity to serve you.
I think I'd like to know more information about the issue, so I was wondering if you can share the schematic of the LCD interface connection, in further, please share the demo code and tell me which line the code executes will trigger the hardfault interrupt.
Looking forward to your reply.

Have a great day,
TIC

 

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos

509 Views
thivya_ashokkum
Contributor II

Hi Jeremy,

I was able to resolve the hard fault issue but I have a different issue with the LCD now.

With the DBI_START set to 0xA0000000, I'm able to write commands to the LCD, say I'm able to write an invert display command and I can see it taking effect on the physical display. However, I'm unable to write any data. 

I use my_dbi[0x10000] for writing commands and this works. But, when I use my_dbi[0x1000] to write data, say to write the color blue to the entire screen, that doesn't work. All I see is a random pattern on the screen. Please see the attached picture.LCD_issue.JPG

I also tried a different address for the DBI_START as 0xB0000000. I'm not sure what is the problem here that's causing data not to be written.

0 Kudos

509 Views
jeremyzhou
NXP Employee
NXP Employee

Hi THIVYA ASHOK KUMAR ,

Thanks for your reply.
I was wondering if you can share the sample code, as I don't have a clear idea of the below description.
I use my_dbi[0x10000] for writing commands and this works. But, when I use my_dbi[0x1000] to write data, say to write the color blue to the entire screen, that doesn't work. All I see is a random pattern on the screen. Please see the attached picture.

Have a great day,
TIC

 

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos