iMx25 harware register

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

iMx25 harware register

跳至解决方案
1,487 次查看
simonl
Contributor I

Hi,
I'm running bare metal on iMx25 PDK with debug board.
I'm trying to access UART register (USR1) on user mode but each time it raise a data abort.
Is hardware register only accessible from privileged mode ?

Documentation says I can read/write as user, may be I miss to configure a register but i don't know which one.

This is the exemple code I made to read USR1 at the boot.

start_boot:

// After a reset, the mode is ARM, Supervisor, interrupts disabled.

// Invalidate both ICache and DCache : not done upon emulator reset

    ldr         r1,=0

    mcr         p15,0,r1,c7,c7,0

// Disable MMU translation, D cache and enable I cache

    mrc         p15,0,r1,c1,c0,0

    ldr         r0,=CP_DIS_MASK         // 0xFFFFEFFA

    and         r1,r1,r0

    orr         r1,r1,#(1<<12)

    orr         r1,r1,#2

    mcr         p15,0,r1,c1,c0,0

// Initialize clocks

bl    low_level_init


// Switch to user and try access USR1

    bic     r0,r0,#MODE_MSK                     // Clear the mode bits

    orr     r0,r0,#USR_MODE                     // Set USER mode bits

    msr     cpsr_c,r0

    ldr     r3, =0x43f90098

    ldr        r3,[r3]

If you have any idea why I can't access uart register in user mode, any help is welcome.

Thanks in advance.


Simon

标签 (1)
0 项奖励
回复
1 解答
1,244 次查看
igorpadykov
NXP Employee
NXP Employee

Hi Simon

this may be related with AIPS priviledge settings,

suggest to create service request for obtaining

AIPS description.

Best regards

igor

在原帖中查看解决方案

0 项奖励
回复
7 回复数
1,244 次查看
simonl
Contributor I

You solve my problem. Thank's a lot igor !

0 项奖励
回复
1,244 次查看
simonl
Contributor I

Ok thank's, I have misunderstood.

0 项奖励
回复
1,244 次查看
igorpadykov
NXP Employee
NXP Employee

Hi Simon

AIPS chapter is not present in RM, you can

obtain it creating service request

Best regards

igor

0 项奖励
回复
1,244 次查看
simonl
Contributor I

Hi Igor,
Sorry for the wait,


I didn't found much information about AIPS registers in the iMx25 doc.
The AIPS A configuration seems to be made by MAX module.
I looked at my MAX description, but it seems good, all access restriction are disabled ...

Best regards

Simon

0 项奖励
回复
1,244 次查看
simonl
Contributor I

Hi Igor
I tried with module clock enabled and disabled for my Uart but I have always the same problem.
When I'm tring to access Uart register in privileged mode, in the same terms it's working.
I thing I have a permission access problem.

I check all my config and none register seems to enable a module which manage access permisson.
So I don't know where problem come from. May be from boot.
I load my program in RAM direclty with JTAG and configure the iMx25 PDK to boot on SD Card.

0 项奖励
回复
1,245 次查看
igorpadykov
NXP Employee
NXP Employee

Hi Simon

this may be related with AIPS priviledge settings,

suggest to create service request for obtaining

AIPS description.

Best regards

igor

0 项奖励
回复
1,244 次查看
igorpadykov
NXP Employee
NXP Employee

Hi Simon

register may be not accessible when module clock is gated

in CCM, so one can check uart bits in CGCRx registers.

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

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

-----------------------------------------------------------------------------------------------------------------------

0 项奖励
回复