CY8CKIT-062-BLE DEBUG_UART RX dies when E-INK display is powered on

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

cross mob
jihe_298791
Level 2
Level 2

I have a CY8CKIT-062-BLE. I enable the DEBUG_UART receiver by doing this:

      /* Unmasking only the RX fifo not empty interrupt bit */

      DEBUG_UART_HW->INTR_RX_MASK = SCB_INTR_RX_MASK_NOT_EMPTY_Msk;

      /* Interrupt Settings for UART */

      Cy_SysInt_Init(&DEBUG_UART_SCB_IRQ_cfg, console_rx_isr);

      /* Enable the interrupt */

      NVIC_EnableIRQ(DEBUG_UART_SCB_IRQ_cfg.intrSrc);

This works perfectly until I turn the E-INK display on. Specifically, this instruction:

   displayDetected = Cy_EINK_Power(CY_EINK_ON);

Cy_EINK_Power calls Pv_EINK_HardwarePowerOn. In that function, this code kills the receiver

    /* Create two pulses on the reset line to properly reset the E-INK driver */

    CY_EINK_RstHigh;

    Cy_EINK_Delay(PV_EINK_PIN_DELAY);

    CY_EINK_RstLow;

    Cy_EINK_Delay(PV_EINK_PIN_DELAY);

    CY_EINK_RstHigh;

    Cy_EINK_Delay(PV_EINK_PIN_DELAY);

0 Likes
17 Replies
ShipingW_81
Moderator
Moderator
Moderator
500 replies posted 250 solutions authored 250 replies posted

In the following code example, UART_DEBUG and EINK dispaly are enabled/used at same time - https://www.cypress.com/documentation/code-examples/ce222793-psoc-6-mcu-motion-sensor-rtos

0 Likes

Thanks for looking at this. The example you provided has the DEBUG_UART transmitting only, which I don’t have an issue with. It’s the DEBUG_UART RECEIVER that breaks when the E-INK display is powered on.

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

Hi,

I just checked the schematic of CY8CKIT-028-EPD and CY8CKIT-062-BLE.

I imagine that CY_EINK_RstHigh and CY_EINK_RstLow are flipping P5[2].

In CY8CKIT-062-BLE, UART_RX is P5[0], UART_TX is P5[1],

and UART_RTS is P5[2].

So if flipping P5[2] affects the UART, I think that the UART's hardware handshake is enabled.

Could you try disabling UART (DEBUG_UART)'s hadware handshake?

As usual, if I'm totally missing the point, I'm sorry.

moto

0 Likes

I don’t have the RTS/CTS enabled. And it used to work just fine but stopped working. I went to an old version of software that was working and it doesn’t work. I purchased another board and it doesn’t work as well. There must be some sort of coupling.

On another note, I have a PWM connected to P9[2] and P9[3]. The P9[2] toggled but the P9[3] stayed low. I then changed P9[3] to P9[4] and it toggles properly. They each had exactly the same configuration. Is there any reason that P9[3] wouldn’t toggle?

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

Hi,

> I don’t have the RTS/CTS enabled.

> And it used to work just fine but stopped working.

I'm sorry for hearing that.

> I went to an old version of software that was working and it doesn’t work.

> I purchased another board and it doesn’t work as well.

> There must be some sort of coupling.

May be the change of  PDL versions is affecting it.

> On another note, I have a PWM connected to P9[2] and P9[3]. 

> The P9[2] toggled but the P9[3] stayed low. I then changed P9[3] to P9[4]  and it toggles properly.

> They each had exactly the same configuration. Is there any reason that P9[3] wouldn’t toggle?

In the schematic, P9[3] is used for TRACEDATA_0 and connection from P9_3 to J2_P9_3 is open (resistor is not placed)

So I hope that if you add a 0 ohm resistor at R131 P9_3 would work.

001-P9_3.JPG002-con2-J2_P9_3.JPG

moto

0 Likes

Looking at the Quick Start Guide, it appears that both DEBUG_UART:rx and E-INK display D0 and mapped to P5[0]. Also, DEBUG_UART:tx and E-INK display D1 are mapped to P5[1]. Am I misunderstanding this?

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

Hi,

I'm referencing

CY8CKIT-062-BLE Rev 15

and

     CY8CKIT-028-EPD (E-INK DISPLAY SHIELD) REV 13

On my E-Ink Shield D0 and D1 are NC.

And 062-BLE D0 = P5_0 (UART_RX) and D1 = P5_1 (UART_TX)

From

https://www.cypress.com/documentation/development-kitsboards/e-ink-display-shield-board-cy8ckit-028-...

001-EPD-Pins.JPG

But may be your version has different pin assignment.

If P5[0] and P5[1] are assigned to both UART and E-INK Data

your problem seems to be natural.

Could you check the version of your boards?

moto

0 Likes

I have the same board revisions.

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

Hi,

> I have the same board revisions.

If so, D0 and D1 of the EPD should be NC.

That's why I was assuming that D2, which is EPD_RST and also used for UART_CTS is causing the problem.

if the following line is called only once (or very few times)

   displayDetected = Cy_EINK_Power(CY_EINK_ON);

Can you deinit and init UART after that line and see if it can workaround the problem?

moto

0 Likes

The deinit/re-init after the display powers up doesn’t work.

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

Hi,

> The deinit/re-init after the display powers up doesn’t work.

Thank you for your testing.

And I'm sorry that it did not help.

By any chance can you attach a project which can reproduce your problem?

moto

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

Hi,

Since your deinit/re-init did not work,

I'm wondering which is affected by the flipping of D2

PSoC 6's UART or PSoC 5LP (KitProg)'s USB-UART bridge.

Can you test the following?

(1) Attache a couple of Jumper wires at D0 and D1

(2) Run your project up to where UART stops working

(3) Connect a Terminal Program to the KitProg's COM

(4) Short D0 and D1

(5) Try typing something from the Terminal Program

If you see the echo back of what you are typing,

KitProg's UART is fine, otherwise KitProg's UART is in trouble with the D2 flip.

If the problem is happening at KitProg's UART, we can not do much from the PSoC 6 side.

May be, it will be the easiest to assign other pins to DEBUG_UART and attache a USB-Serial Converter to it.

moto

0 Likes
lock attach
Attachments are accessible only for community members.
MotooTanaka
Level 9
Level 9
Distributor - Marubun (Japan)
First comment on blog Beta tester First comment on KBA

Hi,

My colleague found us an example project, namely CE220331.

Although it required me to teak setting a little, I could compile and run it on my CY8CKIT-062-BLE.

And as far as I tested, the Debug UART is still alive after the Cy_EINI_Power(CY_EINK_OK) ;

So attached is the archive of my copy of the project.

Would you take a look at it and check if it works on your system

and/or if there is/are difference from your project/setup.

moto

0 Likes
lock attach
Attachments are accessible only for community members.

Please see modified CE220331 project here https://spaces.hightail.com/space/PttrUmM1Xr. I added a DEBUG_UART receiver ISR to uart_debug.c. Open a terminal emulator like TeraTerm and enter characters (e.g. “Test…”) and see that they are echoed back:

Now comment out line 150 of display_task.c (i.e. leave the shield on):

No characters are received. The DEBUG_UART receiver dies when the EINK display is on.

0 Likes
lock attach
Attachments are accessible only for community members.
MotooTanaka
Level 9
Level 9
Distributor - Marubun (Japan)
First comment on blog Beta tester First comment on KBA

Hi,

I tried with PCoC Creator 4.3 , CY8CKIT-062-BLE (Rev 15).

Although E-Ink was displaying the message,

my Tera Term did not echo letters even before uncomment the line.

But in general, if we are using RTOS, I think that ISR must be written the way the RTOS requires.

Note: I'm not adequate enough to write a correct ISR for FreeRTOS.

I'm sorry for not being very useful.

moto

(Edit) 30-Aug-2030 added a missed word. But content remains the same.

0 Likes
lock attach
Attachments are accessible only for community members.

If I use the E-INK display, do I have to remove R119 and R120, and route UART_TX and UART_RX to alternate pins?

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

Hi,

Although I'm still not quite sure if P5[0] / P5[1] are conflicting with EPD data,

but if it's the case and if you don't mind modifying the board,

I think that removing those resistors and assign UART to other pins, which are not taken by the EPD

and connect them using jumper wires to 5LP's P12[5]/P12[6]  will workaround the problem.

moto

0 Likes