Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

the “rts” is always 1

Rank

Total Posts: 5

Joined 0

PM

I want to send some data from msp430 to nRF24AP2, but the RTS is always 1. I want to make sure the way to set the nRF24AP2.

Now I set nRF24AP2 like this:

(1)I set "reset" signal to 0 and delay for 500us and then set "reset" to 1

(2)I set the "sleep" signal to 0 and "suspend" signal to 1.

Is this setting correct? I just want to pull down the RTS.

If it is not the problem with my code, I will check the hardware connection.

Thanks a lot!      
RankRankRank

Total Posts: 55

Joined 2008-10-24

PM

There are two ways to reset AP2 chip: power-up reset and pin control reset. In you application, the pin reset is used.

The RTS should become low, if the AP2 is reset properly and the SLEEP tied to low.

If you read the RTS port from MPS430's GPIO, please check the pin sets in your code, it should be set as:

P1DIR &= ~PIN_RTS;//rts pin as input/low voltage
P1IES &= ~PIN_RTS;//lo to high trigger(because rts will produce a pull-up pulse by ant module)
P1IE |= PIN_RTS;//enable interrupt

if you measured the RTS pin with multimeter, please check the SLEEP pinout, ensure it is set to low.      
Rank

Total Posts: 5

Joined 0

PM

Thank you very much for your reply!
In our project, the "reset" is connected to P1.1, "suspend" is connected to P1.2, "sleep" is connected to P1.3, "RTS" is connected to P1.4.

Now my code changed to
P1DIR &= ~0X08;
P1IES &= ~0X08;
P1IE |= 0X08;
P1OUT = 0X00;
__delay_cycles(500000);
P1OUT = 0X20;
__delay_cycles(500000);
And after these code, the RTS is equal to 1....Could you tell me what's wrong with it? Thanks a lot!      
Rank

Total Posts: 5

Joined 0

PM

sorry I used the wrong pin....
My correct code is
P1DIR &= ~0X10;
P1IES &= ~0X10;
P1IE |= 0X10;
P1OUT = 0X00;
__delay_cycles(500000);
P1OUT = 0X20;
__delay_cycles(500000);

it still not working....Is there any problem with this code?
Thank you very much!      
RankRankRank

Total Posts: 55

Joined 2008-10-24

PM

The delay seems not set correctly.
After the power-up/reset, you should expect the RTS pin goes to low, then you are able to send the command out.

There are a couple of suggestions:
1) After power up/start up, wait for approximately 500 ms before reseting the module.
2) After reset, wait for more than 500 ms then start sending messages to the module

If the suggestions above don't work, we would then need to see traces of the pins in order to solve the issue      
Rank

Total Posts: 1

Joined 0

PM

Hi,I am a co-worker with GuoGuoGuo. According to your explaination,whenever we plug out the USB out of the computer,the ANT should be power down.And then plug it into the computer,it should power up and reset automatically? And I am running the code in CCS by steps.So I guess,the initial state of RTS should be 0 if I do not actually run any sentence and just wait there.Now,even before I run any real code,the RTS is 1.Can I say it is mostly possible a hareware problem?

Thanks      
Rank

Total Posts: 5

Joined 0

PM

Now the problem is when I connect the chip with computer (through JTAG),the ANT power up, I think the RTS signal should be 0. But it still 1....So it is 1 from the very begining.
Besides, when I used the reset signal to reset. pull reset pin down and pull up, it is also doesn't work.
The "sleep" signal, I test it on the board, it is 0. but the "RTS" never change with "sleep" signal....
Thank you very much and looking forward your reply!      
RankRankRank

Total Posts: 55

Joined 2008-10-24

PM

Have you got the startupMessage [A4][01][6F][20] response from the AP2 when it powerup or reset? If not, please check your UART interface of AP2 ensure the pinouts are connected correctly. At startup I would recommend waiting at least 1 ms before attempting to reset. You should be receiving a Startup Message once ANT is done resetting.

If the problem still exist, I would like to review your schematic and time diagrams of the RESET, RTS, TXD,RXD.