EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

microcontroller in SPI Slave mode when clock is continous and no SSEL

Started by blisca November 14, 2012
Please can i have your help?

I'm confused about the following situation:

A transceiver is connected in SPI mode to a microcontroller(LPC12xx).
The transceiver outputs a continous clock ,and it does not drive any SSEL 
line to enable the SPI section of the microcontroller.
The microcontroller should decide when to start a data transmission,but just 
enabling its SPI module it goes in Busy condition and i have found no way to 
change it.
Polling the BSY flag goes to a never ending loop,just as the uC is still 
sending out something,or receiving and it is always busy.

How is the right way to deal with similar situations?

Many thanks for help or hints or links
Diego








On Wed, 14 Nov 2012 23:43:58 +0100
"blisca" <blisca@tiscali.it> wrote:

> Please can i have your help? > > I'm confused about the following situation: > > A transceiver is connected in SPI mode to a microcontroller(LPC12xx). > The transceiver outputs a continous clock ,and it does not drive any SSEL > line to enable the SPI section of the microcontroller. > The microcontroller should decide when to start a data transmission,but just > enabling its SPI module it goes in Busy condition and i have found no way to > change it. > Polling the BSY flag goes to a never ending loop,just as the uC is still > sending out something,or receiving and it is always busy. > > How is the right way to deal with similar situations? > > Many thanks for help or hints or links > Diego >
If your transceiver outputs a continuous clock, and has no SSEL, then how does it expect the receiving device to frame the data? -- Rob Gaddi, Highland Technology -- www.highlandtechnology.com Email address domain is currently out of order. See above to fix.
"Rob Gaddi" <rgaddi@technologyhighland.invalid> ha scritto nel messaggio 
news:20121114144636.1b6ae2d0@rg.highlandtechnology.com...
> On Wed, 14 Nov 2012 23:43:58 +0100 > "blisca" <blisca@tiscali.it> wrote: > >> Please can i have your help? >> >> I'm confused about the following situation: >> >> A transceiver is connected in SPI mode to a microcontroller(LPC12xx). >> The transceiver outputs a continous clock ,and it does not drive any SSEL >> line to enable the SPI section of the microcontroller. >> The microcontroller should decide when to start a data transmission,but >> just >> enabling its SPI module it goes in Busy condition and i have found no way >> to >> change it. >> Polling the BSY flag goes to a never ending loop,just as the uC is still >> sending out something,or receiving and it is always busy. >> >> How is the right way to deal with similar situations? >> >> Many thanks for help or hints or links >> Diego >> > > If your transceiver outputs a continuous clock, and has no SSEL, then > how does it expect the receiving device to frame the data? >
Thanks for your answer Mine is..I dont'know... the transceiver is http://www.analog.com/static/imported-files/data_sheets/ADF7021-N.pdf if you take a look at page 46 Figure 60 you can see how microcontroller and transceiver are connecter.None of lower output signals SWD or SREAD acts as SSEL. At least i could use those signals to write into control registers,to enable TX mode only when i need it,but i don't think that i could have a known number of clock pulses in this way. Thanks for your attention Diego
On 11/14/2012 4:15 PM, blisca wrote:
> "Rob Gaddi" <rgaddi@technologyhighland.invalid> ha scritto nel messaggio > news:20121114144636.1b6ae2d0@rg.highlandtechnology.com... >> On Wed, 14 Nov 2012 23:43:58 +0100 >> "blisca" <blisca@tiscali.it> wrote: >> >>> Please can i have your help? >>> >>> I'm confused about the following situation: >>> >>> A transceiver is connected in SPI mode to a microcontroller(LPC12xx). >>> The transceiver outputs a continous clock ,and it does not drive any SSEL >>> line to enable the SPI section of the microcontroller. >>> The microcontroller should decide when to start a data transmission,but >>> just >>> enabling its SPI module it goes in Busy condition and i have found no way >>> to >>> change it. >>> Polling the BSY flag goes to a never ending loop,just as the uC is still >>> sending out something,or receiving and it is always busy. >>> >>> How is the right way to deal with similar situations? >>> >>> Many thanks for help or hints or links >>> Diego >>> >> >> If your transceiver outputs a continuous clock, and has no SSEL, then >> how does it expect the receiving device to frame the data? >> > Thanks for your answer > Mine is..I dont'know... > the transceiver is > http://www.analog.com/static/imported-files/data_sheets/ADF7021-N.pdf > if you take a look at page 46 Figure 60 you can see how microcontroller and > transceiver are connecter.None of lower output signals SWD or SREAD acts as > SSEL. > > At least i could use those signals to write into control registers,to enable > TX mode only when i need it,but i don't think that i could have a known > number of clock pulses in this way. > > Thanks for your attention > Diego > >
You mean this figure 60, the one that states: Figure 60. ADF7021-N (UART Mode) to Asynchronous Microcontroller Interface This is NOT using the SPI interface for this mode of operation. The paragraph heading should have told you something: UART Mode Please re-read these paragraphs and form your question from there. Its figure 61 that uses SPI. hamilton
"hamilton" <hamilton@nothere.com> ha scritto nel messaggio 
news:k819lu$qaa$1@dont-email.me...
> On 11/14/2012 4:15 PM, blisca wrote: >> "Rob Gaddi" <rgaddi@technologyhighland.invalid> ha scritto nel messaggio >> news:20121114144636.1b6ae2d0@rg.highlandtechnology.com... >>> On Wed, 14 Nov 2012 23:43:58 +0100 >>> "blisca" <blisca@tiscali.it> wrote: >>> >>>> Please can i have your help? >>>> >>>> I'm confused about the following situation: >>>> >>>> A transceiver is connected in SPI mode to a microcontroller(LPC12xx). >>>> The transceiver outputs a continous clock ,and it does not drive any >>>> SSEL >>>> line to enable the SPI section of the microcontroller. >>>> The microcontroller should decide when to start a data transmission,but >>>> just >>>> enabling its SPI module it goes in Busy condition and i have found no >>>> way >>>> to >>>> change it. >>>> Polling the BSY flag goes to a never ending loop,just as the uC is >>>> still >>>> sending out something,or receiving and it is always busy. >>>> >>>> How is the right way to deal with similar situations? >>> >>> If your transceiver outputs a continuous clock, and has no SSEL, then >>> how does it expect the receiving device to frame the data? >>> >> Thanks for your answer >> Mine is..I dont'know... >> the transceiver is >> http://www.analog.com/static/imported-files/data_sheets/ADF7021-N.pdf >> if you take a look at page 46 Figure 60 you can see how microcontroller >> and >> transceiver are connecter.None of lower output signals SWD or SREAD acts >> as >> SSEL. >> > > You mean this figure 60, the one that states: > Figure 60. ADF7021-N (UART Mode) to Asynchronous Microcontroller Interface > > This is NOT using the SPI interface for this mode of operation. > > The paragraph heading should have told you something: UART Mode > > Please re-read these paragraphs and form your question from there. > > Its figure 61 that uses SPI. > > hamilton
Thank you , i realized that the datasheet in my PC is not the same as the one that i linked. Is Figure 61.
On 15.11.12 1:15 , blisca wrote:
> "Rob Gaddi" <rgaddi@technologyhighland.invalid> ha scritto nel messaggio > news:20121114144636.1b6ae2d0@rg.highlandtechnology.com... >> On Wed, 14 Nov 2012 23:43:58 +0100 >> "blisca" <blisca@tiscali.it> wrote: >> >>> Please can i have your help? >>> >>> I'm confused about the following situation: >>> >>> A transceiver is connected in SPI mode to a microcontroller(LPC12xx). >>> The transceiver outputs a continous clock ,and it does not drive any SSEL >>> line to enable the SPI section of the microcontroller. >>> The microcontroller should decide when to start a data transmission,but >>> just >>> enabling its SPI module it goes in Busy condition and i have found no way >>> to >>> change it. >>> Polling the BSY flag goes to a never ending loop,just as the uC is still >>> sending out something,or receiving and it is always busy. >>> >>> How is the right way to deal with similar situations? >>> >>> Many thanks for help or hints or links >>> Diego >>> >> >> If your transceiver outputs a continuous clock, and has no SSEL, then >> how does it expect the receiving device to frame the data? >> > Thanks for your answer > Mine is..I dont'know... > the transceiver is > http://www.analog.com/static/imported-files/data_sheets/ADF7021-N.pdf > if you take a look at page 46 Figure 60 you can see how microcontroller and > transceiver are connecter.None of lower output signals SWD or SREAD acts as > SSEL. > > At least i could use those signals to write into control registers,to enable > TX mode only when i need it,but i don't think that i could have a known > number of clock pulses in this way. > > Thanks for your attention > Diego
To your original question: The payload interface (TxRxCLK and TxRxDATA) transfers just a raw bit stream with no framing provided, see figures 8 and 9 in the linked data sheet. It is up to you to decode the bit porridge. A suggested framing is in figure 54 of the data sheet. The raw bit stream is not very well suited to a SPI interface, though it is so named by AD. You might be better off using the UART mode with an UART interface on the host processor. -- Tauno Voipio
"Tauno Voipio" <tauno.voipio@notused.fi.invalid> ha scritto nel messaggio 
news:k82ajv$ki4$1@dont-email.me...
> On 15.11.12 1:15 , blisca wrote: >> "Rob Gaddi" <rgaddi@technologyhighland.invalid> ha scritto nel messaggio >> news:20121114144636.1b6ae2d0@rg.highlandtechnology.com... >>> On Wed, 14 Nov 2012 23:43:58 +0100 >>> "blisca" <blisca@tiscali.it> wrote: >>> >>>> Please can i have your help? >>>> >>>> I'm confused about the following situation: >>>> >>>> A transceiver is connected in SPI mode to a microcontroller(LPC12xx). >>>> The transceiver outputs a continous clock ,and it does not drive any >>>> SSEL >>>> line to enable the SPI section of the microcontroller. >>>> The microcontroller should decide when to start a data transmission,but >>>> just >>>> enabling its SPI module it goes in Busy condition and i have found no >>>> way >>>> to >>>> change it. >>>> Polling the BSY flag goes to a never ending loop,just as the uC is >>>> still >>>> sending out something,or receiving and it is always busy. >>>> >>>> How is the right way to deal with similar situations? > > > The payload interface (TxRxCLK and TxRxDATA) transfers just a raw bit > stream with no framing provided, see figures 8 and 9 in the linked > data sheet. It is up to you to decode the bit porridge. A suggested > framing is in figure 54 of the data sheet. The raw bit stream is not > very well suited to a SPI interface, though it is so named by AD. > > You might be better off using the UART mode with an UART interface > on the host processor. > > --
Thank you too,Tauno i did something working on SPI,but i 'm not able to master it completely, by now i'm on a trivial software handling of that communication,using a GPIO edge interrupt and a pulse clock counter and it works correctly. UART mode is not allowed for the modulation that was decided by the RF pals Thanks again to you all

The 2024 Embedded Online Conference