0
\$\begingroup\$

I am using a SIM5360 and works very well for GPS and GSM communications. Now I am using the SPI too: I have the SPI activated (AT+CGFUNC) and configured (I following the SPI application note). But, when I send a command (only been tested with write commands) I have always 3bytes with 0x00 after addres and before the data that I want transmit.

Someone have the SPI communication working fine in a SIM5360 module?

Thank you.

\$\endgroup\$
0
\$\begingroup\$

It sounds like padding, since the max. transfer size is 4 bytes. I assume you mean that the receiving side sees 0x000000bb when you send data bb. It may be that you transfer unit is set to 32 bits i.e 4 bytes. You can check with AT+ CSPISETPARA?.

If that's the case, you can try changing it with AT+ CSPISETPARA =8,0,1 which means you'll only send 8 bits when transferring byte-sized data.

|improve this answer|||||
\$\endgroup\$
  • \$\begingroup\$ Thanks for your answer, but I have the cspisetparam ok, for 8 bits. I following the application note for SPI communication in SIM5360. I tried with 8, 16 and 32 bits bit I have always the 0x00... this is very strange. I am using the EVB and I have Uart2 disabled and the CP2103 in reset... \$\endgroup\$ – user146886 Apr 23 '17 at 0:21
  • \$\begingroup\$ @user146886 EVB? UART2? CP2103? You need to give better details. \$\endgroup\$ – TisteAndii Apr 23 '17 at 1:29
  • \$\begingroup\$ Maybe you can try messing with the last parameter i.e. packing data from the output buffer. Try AT+ CSPISETPARA =8,0,0 instead. \$\endgroup\$ – TisteAndii Apr 23 '17 at 1:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.