Hi, have a problem with SPI com. that normally shouldn't be a problem at all. This project require low power and in VLPR mode the sys clock is 4MHz and bus clock 800Khz.
On the SPI0 bus i have 3 components, eeprom, LPS22HH and LSM6DS3, when reading and writing to eeprom everything is fine, but to keep a low power I use LSP22HH in one-shot mode.
What happens is that writing to the LPS is ok ,but reading the current peak i 5mA from normally 0.7mA. I located the problem to MISO. Background of these PCB:s are that AISLER in Germany has produced them but with my layout. I ordered 5pcs and they all have the same problem.
Attached some pictures where pic 18122...shows CS and MISO where MISO draw high current but can actually work normally. Has anyone seen this issue ?, The pcb:s are not verified from production since there was SW.
Regards
Claes
Hello @claeskjellstrom ,
Thanks for your post. Since you are using a custom board, my testing is limited on this end. I will try my best to provide you with some suggestions.
First, please check the hardware connections. Make sure that all the connections on the SPI bus, especially the MISO line, are secure and there are no short circuits or open circuits. Also, verify that the pins of the LPS22HH for configuration and operation are correctly connected according to its datasheet.
Regarding the SPI communication settings, check if the clock polarity (CPOL) and clock phase (CPHA) are set correctly to match the requirements of the LPS22HH. Also, ensure that the SPI transfer rate is within the acceptable range for the device, especially in the low-power VLPR mode.
It would be beneficial to conduct some comparison tests. Try replacing the LPS22HH chip with a different one to see if the problem persists, which could indicate a chip-specific issue. Additionally, test the SPI read/write operations in other non-low-power modes to determine if the problem is unique to the VLPR mode.
Hope these suggestions will help you identify and solve the problem. If you have solved your problem or there is any new progress, you are welcome to share it in our community.
BRs,
Celeste
Hi Celeste, verified CPOL &CPHA (0.0) or (1.1), end eeprom works, but problem remains. eeprom , LPS22HH and LSM6DS3 share the SPI bus, and no high current peaks when running eeprom, so the only problem must be related to the CS pins(PTA3=CS_EEP, PTA4=CS_LPS, PTB11=CS_LSM). I will manually measure resistance on a bare PCB.
Regards
Claes
Hi Celeste and thank you
Regarding the replacement of LPS22HH it's difficult to perform so that is not an option, also remember that
the eeprom(CAT25128), is working fine both Rd and Wr, What I did not mentioned was that it
's only when CS is going high(previous attached picture) that the current peak occurs. I think that the CPOL and CPHA might affect this as you suggested, especially when it sometimes work according to attached pictures. I have looked through a microscope the traces but can't find any strange about it which doesn't mean that there is no problem. I'm sick of all the time and money I spent on this. I will try to change CPOL/CPHA and see if it makes some difference.
One thing that comes to my mind is that when Rd a register I add(0x80) according to datasheet but when writing I assumed that bit 7 always is a '0' since Wr to registers not having bit 7 set. I might be wrong.
BR's
Claes
Hi, It seems like the problem is related to soldering issue(underneath HLGA-10 and 12 pin) and I would like to x-ray the PCB, but since that is difficult(don't know anyone) I will make a third test and also remove the top layer GND(only signals, not GND) to make it easier for the manufacturer(AISLER) to produce it.
Regards
Claes
Hi,
I'm glad to hear that you've made new progress. Thank you also for your continuous sharing.
BRs,
Celeste