Unexpected behaviour access mini flex bus Memory mapped IO.

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Unexpected behaviour access mini flex bus Memory mapped IO.

1,142 次查看
netra
Contributor IV

I a using MCF52259 custom board where I  am using memory mapped I/O. Using mini flex address bus and chip select 1, i am selecting D Latches. My mini flexbus data lines are connect to input of D latches and Output of D latches are connected to LEDs. 

       When i run my application continuously , I am not getting expected behavior.

      

       When I put a break point after writing to  address and step through . I am getting expected behavior.

i have introduced sleep after updating to address. it is of no use.

I have changed wait states but nothing  working.

Please let me know what i have missed.

0 项奖励
回复
3 回复数

901 次查看
drummer
Contributor IV

I am using a similar scheme. I memory mapped my I/O and use a D-LATCH to set the output. I found that you must point to your I/O device as char * .

It will otherwise send two bytes to your D-LATCH.

#define A_ADDR0x30020000

void qa_out(uchar new_output)

{

  uchar *  io_addr;

  io_addr = (uchar *) A_ADDR;

  *io_addr =(uchar) new_output;

}

0 项奖励
回复

901 次查看
c0170
Senior Contributor III

Hello netra,

regarding your last posts here on the community, I recommend reading this document before you write new post here:

How to post in the MQX section and get an answer!

Your posts contain lack of details. I emphasized it the last time. Please share more (as Martin's pointed what you probably should have included) if you want to get a relevant answer.

One small addition, I have not seen that you update your threads, could you please update them with a status (share a solution, a workaround). Thank you!

Regards,

c0170

0 项奖励
回复

901 次查看
Martin_
NXP Employee
NXP Employee

Netra,

would be great if you can share:

1. picture of hardware schematic to show how exactly you connect the MCU with latches and LEDs

2. code snippet of the software you're using to configure the peripheral module and write data

3. would be nice to see also oscilloscope screenshot to show the external bus access, how it looks like on your hardware in case of unexpected behavior

0 项奖励
回复