Mesh devices SPI writes not working

Hi Guys,

We are using particle Photons and Electrons which are communicating with MAX3503 chip via SPI. This is working fine with these Photons/Electrons. We bought some mesh devices and using adapter we connected it to the PCB. The issue now is we couldn’t write the maxim config anymore with the mesh devices. Is there any configuration changes we need to do for mesh devices? We are using SPI1.

Thanks.

Update:

I could find out that the pins for SPI1 communications changed in mesh devices. We were using D5 of photons which were Slave Select(SS). Does anyone know the SS for SPI1 in mesh devices?

AFAICT there is no default SS pin for SPI1 but you can use any pin you want (that’s also true for SPI and always was true on previous devices too).
The SS assignment in the docs should be taken as mere suggestion and not as statement of fact - there never was special treatment of the SS pins (other than using it as default value when the csPin parameter was omitted in SPI.begin(int csPin = SS)) :wink:

2 Likes

Thanks, @ScruffR.

You are always on time :star_struck: Previously we were using D5 pin as SS with SPI1 in photons. The communications were successful. Now with Argon, it doesn’t work. The docs say that it will work with any GPIO pins same as you are saying. Am I missing something? What can cause the issue?

It should work, but when you said

What kind of adapter is that?

Sorry for the delay ScruffR.

We are using this adapter https://store.particle.io/products/particle-classic-adapter

Can you provide the actual pinout you are using?
Could it be that you overlooked the unfortunate discrepancy between Gen2 and Gen3 devices where D2 & D4 were swapped round? While the pins as such stayed the same MOSI & CLK swapped place while MISO stayed the same :confused:

Or was this what you meant with

3 Likes

Could it be that you overlooked the unfortunate discrepancy between Gen2 and Gen3 devices where D2 & D4 were swapped round? While the pins as such stayed the same MOSI & CLK swapped place while MISO stayed the same :confused:

I don't know how I missed it. Thanks for the tip ScruffR :relaxed:. I will update this thread with the results.

1 Like

@ScruffR,

The documentation of the SPI1 port was wrong for the mesh devices while I was refering. The correct port configuration is:
SCK => D2
MOSI => D3
MISO => D4
and they corrected it now. We don’t have a choice but to design a new PCB now.

2 Likes