--- In , Tigli Filippo <f_tigli@y...>|
> I'm working on 56309 prototype, but I need ADM56301
> for testing...
> I cannot move port B HI32 as GPIO..
> On 56309 only these settings are needed to have all
> port B pins as GPIO
> movep #$00ffff,x:M_HCR ; PORT B control reg
> movep #$00ffbf,x:M_HDDR ; PORT B DATA direction
> movep #$000001,x:M_HPCR ; PORT B all GPIO
> on 56301 only these registers should be set
> movep #$00ffbf,x:M_DIRH ; Host Port GPIO direct.
> movep #$4FFFFF,x:M_DCTR ; 56301 Host control reg
> When I attempt to move GPIO with usual :
> bchg #1,x:M_DATH ; Bport 56301 !
> Dsp runs fine, but never happens over GPIO pins..
> Do you know if another settings are required to move
> GPIO over 56301 ?
> Thank you in advance!
> -- F.Tigli SCPOP author ---
> Visit our Web site
Per the user manual:
"The HDSM, HRWP, HTAP, HDRP, HRSP, HIRH, and HIRD
bits affect the host port pins directly. To assure proper
operation, these pins can be changed only when DSR[HACT]
= 0. The HM bits must not be changed together with
these bits (that is, in the same core write). "
Since these bits are 0 at reset, either leave them zero:
movep #$400000,x:M_DCTR ; 56301 Host control reg
Or set them to 1 then set the HM[2-0] bits:
movep #$0FFFFF,x:M_DCTR ; leave HM[2-0] at zero
movep #$4FFFFF,x:M_DCTR ; now change HM[2-0] to GPIO mode.
The DSR[HACT] test would only be needed if you were using the HI32 in
some other mode then wanted to switch to GPIO mode. Since you're
probably going to GPIO mode directly from reset, it's not needed.
email disconnected due to spam overload