SOLVED!!! : Before using the BSoM evaluation board, make sure to check the jumper configuration! Without doing that, the pins marked as (e.g. D6)
Digital only GPIO, and PWM
might not work as intended. In my case, I was not able to pull them HIGH.
-------------------------------- *
Hi -
Hoping someone can shed some light, I am losing my mind
I am connecting an ePaper display to a custom PCB. After spending two days debugging the custom PCB, I decided to use a new B524 on a SoM Evaluation board. My initial Pinout used on the custom PCB, that does not work on the SoM eval board either, is below:
I then started changing thew pins one by one and it seems the culprits are D5 and D6 connected to RST and DC pins on the screen respectively.
From what I can see in the display Wikipage, the RST, DC and BUSY should be connected to GPIO pins and then declare in the code which I do, but D5 and D6 simply does not work.
Is there a particular reason why e.g. D5 and D6 will not work but swopping them for D4 and D2 solves the problem?
Isolated the issue to D6... I will replace the B5Som in the morning, maybe there is a problem with D6 on the hardware side?
Below are couple of results from further testing. The RST pin on the display seems to be the one being pedantic about which GPIO pin it connects to.
/* DEBUG */
//#define RST_PIN D22 // fail
//#define RST_PIN D6 // fail
//#define RST_PIN D1 // fail
//#define RST_PIN D2 // ok
//#define RST_PIN D3 // ok
#define RST_PIN D4 // ok
#define DC_PIN D5 // ok
#define CS_PIN SS // ok
#define BUSY_PIN D7 // ok
EDIT: ------------------------<
From what I can see on the datasheets I could not see a reason why this would not work either, hence the post Was really hoping I was missing something obvious...
So just to clarify... If I use:
#define RST_PIN D6
#define DC_PIN D5
and wire correspondingly, the ePaper display does not work. If I change it to:
#define RST_PIN D4
#define DC_PIN D2
and wire accordingly, the ePaper display does work. Aside from this, everything else is the same and to eliminate other components or code interfering, I commended everything else out so I only have the ePaper code running.
Waveshare support is asking me whether there are any internal pulldown resistors attached to D6? I have done more tests.... it seems the only Digital pins RST_PIN does not work on are D1, D6 and D22 (I might have missed some, not sure whether I tested them all). Below is a list of pins it does work on...
//#define RST_PIN D9 // ok
//#define RST_PIN D10 // ok
//#define RST_PIN D2 // ok
//#define RST_PIN D3 // ok
//#define RST_PIN D4 // ok
This behaviour is unique to the RST_PIN. This is demonstrated int the following test.
Working Test
#define BUSY_PIN D6 // ok
#define RST_PIN D7 // ok
Failing Test:
#define BUSY_PIN D7 // ok
#define RST_PIN D6 // FAIL
From the library the code pertaining to the RST_PIN seems quite straight forward, so not sure what the problem is.
If you flash firmware that only toggles pin D6 slowly and monitor it with a DMM, logic analyzer, or oscilloscope, does it change? Also, do you have pinMode(D6, OUTPUT) somewhere in the code? That is required.
The B523/B524 use a different nRF52840 pin for D6 than the Boron/B402/B404/B404X so it's possible that there could be a difference, but it seems unlikely because pin P1.04 doesn't appear to have any special requirements.
I verified the B52x schematic and M.2 SoM pin 70 is connected to nRF52840 pin P1.04 (U24). This corresponds to SoM pin PWM2 or D6, and this appears to match the b5som pinmap.
I don't have a B52x SoM, but I did test a B404 SoM in the eval board and D6 toggled normally, This isn't a perfect test because the B4xx and B5xx SoM use a different nRF52 pin, but it does show that pin D6 (PWM2) on the eval board does work.
I was meaning to reply sooner but I was out all day and just got back.
I managed to resolve the 'issue' around D6 pin, though not sure why or whether this is intended. There is jumper in one of the two banks of jumpers that seems to cause this behaviour. If I remove the jumper, D6 functions normally. If I bridge the jumper out, D6 goes (and stays) low.