PSoC 5LP UART receiver Interrupt not triggering with BLE

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
KaGa_3938861
Level 3
Level 3
10 likes given 5 likes given First like received

I am working on PSoC 5LP and External BLE(SPBTLE-1S module) project, I have set up UART changes in the PSoC 5LP and the UART is working fine with both TX and RX functionalities. I need to transmit and receive data through a BLE device that is connected to this transmitter and receiver of the PSoC device.

The Tx of the PSoC is connected to receiver of the BLE and then it will transmit the data to application connected.

The RX of the PSoC is connected to the tranmitter of the BLE, commands send to the BLE will be received and transmitted to the  UART of PSoC.

When i tested by sending data from the PSoC device to BLE, I am able to receive it in the Application(connected to BLE).

But when i am sending data to the BLE, I am not able to receive it at the PSoC device end, When i tested the BLE separately both transmission and data reception are working fine.

Is there any other interrupt it need to set when data is received through the UART with these external pins(The BLE TX is connected to receiver of the UART(pin 12.6)? .

Thanks,

Karthik

0 Likes
1 Solution
MotooTanaka
Level 9
Level 9
Distributor - Marubun (Japan)
First comment on blog Beta tester First comment on KBA

Hi,

I've just noticed following line.

> Is there any other interrupt it need to set when data is received through the UART with these external pins(The BLE TX is connected to receiver of the UART(pin 12.6)? .

Which EVB are you using?

In case you are using CY8CKIT-059, pin 12.6 and pin 12.7 are already connected to the KitProg.

If it's the case, please use different pins for (at least) UART_RX.

moto

View solution in original post

9 Replies
MotooTanaka
Level 9
Level 9
Distributor - Marubun (Japan)
First comment on blog Beta tester First comment on KBA

Hi,

If you use polling mode, checking UART_GetRxBufferSize() periodically and receive the data you may not need interrupt.

But if you want to make the program to call isr when something was received at UART_rx pin, you need to set up isr for that.

Recently I wrote a sample for that matter in a topic below, would you take a look at it?

PSoC 5LP UART interrupt is triggering continuously

moto

Hi,

Yes, as i mentioned in the question, UART interrupt changes is working fine. When i try to send and receive data using UART everything is working fine. This UART transmitter and receiver pins are connected to BLE, The data transmitted to BLE is not received at UART receiver end.

BLE alone and UART alone are working fine. when they are connected i am seeing below behavior.

1. From PSoC to TX, Tx to BLE and BLE to application is working fine.

2. but Application to BLE, BLE to UART is not working..

I want to know is there any other changes i need to do to trigger Receiver interrupt of UART when Receiver pin is connected to an external device?

0 Likes
MotooTanaka
Level 9
Level 9
Distributor - Marubun (Japan)
First comment on blog Beta tester First comment on KBA

Hi,

> Yes, as i mentioned in the question, UART interrupt changes is working fine.

> When i try to send and receive data using UART everything is working fine.

Oh, I'm sorry for my short site.

So you confirmed that UART part is working fine.

> This UART transmitter and receiver pins are connected to BLE,

> The data transmitted to BLE is not received UART receiver end.

I've skimmed the datasheet

https://www.mouser.jp/datasheet/2/389/spbtle-1s-1156255.pdf

It seems that the BLE module has both UART TX/RX and UART CTS/RTS.

CTS and RTS are for hardware handshake.

If you are not connected these to PSoC,

try connecting these 2 pins together for "no hardware handshake".

UART_CTS (PIN 7 or PIN 15) with UART_RTS(PIN 9 or PIN18).

moto

MotooTanaka
Level 9
Level 9
Distributor - Marubun (Japan)
First comment on blog Beta tester First comment on KBA

Hi,

Adding to my previous post, I thought that may be connecting real RTS/CTS is better.

To do that in the UART Config dialog, Select "Hardware" for "Flow control"

000-Dialog.JPG

The the symbol of UART was changed

Now it has cts_n and rts_s.

Connect Digital Input and Digital Output and assign available pins to these.

Then connect

BLE_RTS to UART_CTS

BLE_CTS to UART_RTS

001-schematic.JPG

If the problem was being caused by the flow control,

I hope that this will take care of that.

moto

Hi,

Thank you for your time, As you mentioned i changed the flow-control to Hardware, and then i connected the pins to the BLE module's RTS and CTS, the issue still persists. I am not able to receive data from BLE through UART Receiver.

0 Likes
MotooTanaka
Level 9
Level 9
Distributor - Marubun (Japan)
First comment on blog Beta tester First comment on KBA

Hi,

I'm very sorry that my suggestion(s) did not work.

When you wrote UART can receive data from its RX, you are using uart_rx interrupt, right?

If so, have you tried put a break point inside the uart_rx's isr?

And has the program stopped there?

If the break point never hits, BLE seems not sending data via it's TX pin.

So it's time to check the program of BLE side.

(I'm sorry but I won't be very helpful this side)

And if the break point hits but still you are not receiving data,

probably you need to check your receiving function.

moto

0 Likes
MotooTanaka
Level 9
Level 9
Distributor - Marubun (Japan)
First comment on blog Beta tester First comment on KBA

Hi,

I've just noticed following line.

> Is there any other interrupt it need to set when data is received through the UART with these external pins(The BLE TX is connected to receiver of the UART(pin 12.6)? .

Which EVB are you using?

In case you are using CY8CKIT-059, pin 12.6 and pin 12.7 are already connected to the KitProg.

If it's the case, please use different pins for (at least) UART_RX.

moto

In case you are using CY8CKIT-059, pin 12.6 and pin 12.7 are already connected to the KitProg.

If it's the case, please use different pins for (at least) UART_RX.

This was the issue, I configured another pin to act as Receiver Pin of UART instead of the default pin(12[6]), and the Issue got resolved.

I have not connected the hardware handshakes and i tried connecting them together, and the issue haven't resolved.

Thank you.

0 Likes