K82 : access to VBAT and SYS register files

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

K82 : access to VBAT and SYS register files

1,166 次查看
EugeneHiihtaja
Senior Contributor I

Hi !

It is not so clear everything about SYS and VBAT register files.

Are they just memory areas what mapped to memory 

0x40041000 System Register file

0x4003E000 VBAT register file

?

I can see this addresses in AIPS0 tables.

But can access with User privileges given to those areas ?

Also in MK82F25615.h VBAT register file defines as 8 dword long only. Should it be 32 dwords long ?

"

/** RFVBAT - Register Layout Typedef */
typedef struct {
__IO uint32_t REG[8]; /**< VBAT register file register, array offset: 0x0, array step: 0x4 */
} RFVBAT_Type;

"

Regards,

Eugene

0 项奖励
回复
3 回复数

1,003 次查看
mjbcswitzerland
Specialist V

Hi Eugene

The system and RTC register files in the K82 can be accessed (R/W) as byte, short or long word in user or supervisor mode.

There are 32 bytes of system register file space and 128 bytes of RTC register file space [the size in your header looks to be incorrect]

All can be accessed with normal memory mapped accesses.

Beware that RTC register file space can only be accessed when VBAT is connected - it will hard fault if not (as do accesses to other RTC registers).

The content remains stable across resets but is cleared to 0 on power cycles (main power for system register file space and VBAT power for RTC register file space).

Regards

Mark


http://www.utasker.com/
http://www.utasker.com/kinetis/FRDM-K82F.html
For less questions and faster, cheaper developments: try uTasker for Kinetis

0 项奖励
回复

1,003 次查看
EugeneHiihtaja
Senior Contributor I

Hi Mark !

Thank you !

Is any reason in SDK for have 8 instead of 32 ? Can it be some hidden defect of other limitations ?

Regards,

Eugene

0 项奖励
回复

1,003 次查看
mjbcswitzerland
Specialist V

Eugene

Probably the SDK is simply wrong; if it was done for a specific reason there would presumably have been a comment to explain why. You may need to ask the programmer (if he/she is known and hasn't already left the company).

Regards

Mark

0 项奖励
回复