Maple Mini SPI Slave - data get corrupt

Maple Rev3, Maple Rev 5 and Maple Ret 6, iTead Maple etc
ncw2k69
Posts: 10
Joined: Tue Jul 26, 2016 7:52 pm

Re: Maple Mini SPI Slave - data get corrupt

Post by ncw2k69 » Fri Jul 29, 2016 8:09 am

thanks to Pito, manage to make it work, i swapped the resistors position from Master - Res - Conv - Mini to Master - Conv - Res - Mini and now i have a strong data signal output from master

User avatar
martinayotte
Posts: 1182
Joined: Mon Apr 27, 2015 1:45 pm

Re: Maple Mini SPI Slave - data get corrupt

Post by martinayotte » Fri Jul 29, 2016 1:36 pm

Do you means that you had placed a pullup on the wrong side of the converter ?
Image
Here we see pullups on both sides, but this is because it is a bi-directional level-shifter, such as I2C.
When used as uni-directional, only the receiver side requires a pullup.

ncw2k69
Posts: 10
Joined: Tue Jul 26, 2016 7:52 pm

Re: Maple Mini SPI Slave - data get corrupt

Post by ncw2k69 » Fri Jul 29, 2016 5:55 pm

In the original scheme for cpu, on comuication wires are resistors in series, see attached picture
Attachments
_20160729_205048-1024x576.JPG
_20160729_205048-1024x576.JPG (143.72 KiB) Viewed 573 times

User avatar
martinayotte
Posts: 1182
Joined: Mon Apr 27, 2015 1:45 pm

Re: Maple Mini SPI Slave - data get corrupt

Post by martinayotte » Fri Jul 29, 2016 6:31 pm

Why do you need those resistors in series ?
The board you are using has 4 times the schematics I've provided, there is no need for those series resistors.

ncw2k69
Posts: 10
Joined: Tue Jul 26, 2016 7:52 pm

Re: Maple Mini SPI Slave - data get corrupt

Post by ncw2k69 » Fri Jul 29, 2016 6:47 pm

i think they were put there to limit current when display enters/exits stand-by
Attachments
cpu output.PNG
cpu output.PNG (32.89 KiB) Viewed 571 times

ncw2k69
Posts: 10
Joined: Tue Jul 26, 2016 7:52 pm

Re: Maple Mini SPI Slave - data get corrupt

Post by ncw2k69 » Fri Jul 29, 2016 7:15 pm

is a way to do reset from code on maple mini?

User avatar
martinayotte
Posts: 1182
Joined: Mon Apr 27, 2015 1:45 pm

Re: Maple Mini SPI Slave - data get corrupt

Post by martinayotte » Fri Jul 29, 2016 8:51 pm

You can jump to the reset vector, but it won't be the same as doing external reset, especially is reset line is also used to reset external peripheral.
But, you can also use an GPIO attached to RES and trigger it from software.

ncw2k69
Posts: 10
Joined: Tue Jul 26, 2016 7:52 pm

Re: Maple Mini SPI Slave - data get corrupt

Post by ncw2k69 » Fri Jul 29, 2016 9:11 pm

managed to do the reset function, it works

Code: Select all

//hardware\leaflabs\cores\maple\nvic.h
void nvic_sys_reset();

Code: Select all

//hardware\leaflabs\cores\maple\nvic.c
void nvic_sys_reset() {
    uint32 prigroup = SCB_BASE->AIRCR & SCB_AIRCR_PRIGROUP;
    SCB_BASE->AIRCR = SCB_AIRCR_VECTKEY | SCB_AIRCR_SYSRESETREQ | prigroup;
    asm volatile("dsb");
    while (1);
}
ported from http://www.stm32duino.com/viewtopic.php?f=18&t=678

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests