2008-03-27 03:40:04     how to operate resister PORTGIO_CLEAR in c language?

Document created by Aaronwu Employee on Aug 5, 2013
Version 1Show Document
  • View in full screen mode

2008-03-27 03:40:04     how to operate resister PORTGIO_CLEAR in c language?

sj tian (CHINA)

Message: 53099   

 

I want to set *pPORTGIO_CLEAR = 0x0780; when under VisualDSP, it is ok. but uder uclinux it not ok.

 

how  to operate  register PORTGIO_CLEAR  in c language  under uclinux.

 

thanks!

QuoteReplyEditDelete

 

 

2008-03-27 08:07:47     Re: how to operate resister PORTGIO_CLEAR in c language?

Mike Frysinger (UNITED STATES)

Message: 53131    if you look at the many Blackfin drivers you'll see that we use the form:

bfin_read_MMR() and bfin_write_MMR()

 

but, there should be no need for you to access any of the PORT registers now as we have peripheral/gpio apis to handle that stuff for you

QuoteReplyEditDelete

 

 

2008-03-27 21:46:50     Re: how to operate resister PORTGIO_CLEAR in c language?

sj tian (CHINA)

Message: 53191   

 

thanks!

 

I need use mang register besides gpio, such as PLL_CTL,PLL_DIV and EBIU_SDRRC etc.. maybe I need use

 

bfin_write_MMR(), and is there any document describing this functions on your web? When I use this function,

 

which .h file in uclinux source file  I need inculde.

 

pls give me a hints, thanks!

 

 

QuoteReplyEditDelete

 

 

2008-03-27 23:02:48     Re: how to operate resister PORTGIO_CLEAR in c language?

Mike Frysinger (UNITED STATES)

Message: 53202    you should not be accessing core registers such as the PLL or the EBIU.  those settings are controlled by U-Boot, or optionally via the kernel configuration menu.  kernel drivers should not go mucking with such things.

 

the bfin_{read,write}_MMR macros behave exactly as you expect.  for documentation on MMRs, just consult the HRM.  to access any of them, just include blackfin.h.

Attachments

    Outcomes