PSoC 4 SPIM/SPIS (SCB) Example Problems | Cypress Semiconductor
PSoC 4 SPIM/SPIS (SCB) Example Problems
I am currently trying to develop software for a PSoC 4 to communicate with a MCP2515 CAN controller; however, I cannot get the SCB SPI block to work. I have a PSoC 4200 Prototyping kit that is programmed via the USB boot loader.
I have copied the blocks, the pin mapping and the code from this example and placed it in the project I created that was bootloadable. I made some small modifications where I replaced the LCD to a uart print out so that I could attempt to do some rudimentary debugging.
The project should simply put a list of SPI commands into the slave tx buffer, then into the master tx buffer, and then should read and print from the opposing rx buffers. This does not work, all I get is 255 for every byte that comes through when they are clearly not meant to be of this value.
Further down the track it will be necessary to have this function interrupt driven so I can set masks on the CAN controller and then get messages transmited etc, but I have no implemented this at this stage.
I have attached the example project for your reference.