I'm trying to use the Static Memory Controller (SMC) of a ADSP-21587 to connect an LCD module. The module has a normal parallel interface 16 bits wide, a register select pin for writing command or data, a ~RE, ~WE, and a ~CS. I've used the GPIO mode of every pin and explicitly set each signal to create a read and write function. The hardware is confirmed working.
When I try to configure as the SMC peripheral I can't get anything to happen:
I use the pin-multiplexing add-in of CCES to configure A01(RS), AMS0(~CS), ARE(~RE), AWE(~WE) and D0-D15 for SMC. I initialize the bus timing register pREG_SMC0_B0TIM and enable the bank with pREG_SMC0_B0CTL bit zero. After bootup the bus control lines are taken high as expected. However, now I can't read or write to the SMC bank 0 addresses and get the SMC bus to do anything. I'm trying:
#define LCD_CMD ((uint16_t *)0x40000002)#define LCD_DATA ((uint16_t *)0x40000000)
*LCD_CMD = some_value; *LCD_DATA = some_value;
The AMS0, AWE and ARE lines are never changing (I can't find the signals changing on an oscilloscope)
What else do I need to be doing to get the SMC to read and write the bus like this?
Please note that the preload code is disabling secure read and write transactions in SMPU. So apart from your register configurations, you would also have to configure SMPU to enable secure reads and writes in your code.i.e.,
You can add the following register configuration in your code.
*pREG_SMPU0_SECURECTL = (ENUM_SMPU_SECURECTL_WSECEN|ENUM_SMPU_SECURECTL_WNSDIS | ENUM_SMPU_SECURECTL_RSECEN | ENUM_SMPU_SECURECTL_RNSDIS | ENUM_SMPU_SECURECTL_SBEDIS);
Please let us know if you still have any problem in accessing SMC0.
Can you also confirm whether the cache enabled or not?
waiting for response after replied by Mr Jithul
Hi Ashok,In order to assist you better on this, can you please elaborate more on what is the exact issue you are facing? Regards,Anand Selvaraj.
Hi anand ,
Hi anand i have sc-589 eval board i want to monitor SMC0 signal (data ,address, read and write signals ) through extension card on logic analyzer for timeing sequence . can you send one working example code .