mbo

Members
  • Content Count

    23
  • Joined

  • Last visited

  • Days Won

    1

mbo last won the day on February 28 2018

mbo had the most liked content!

About mbo

  • Rank
    Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. mbo

    Zybo and PmodCAN

    Hi @jpeyron, thank you for that advice. Is there a example how to use function CAN_ReadReg, because there are some parameter I do not understand how to use? void CAN_ReadReg(PmodCAN *InstancePtr, u8 reg, u8 *data, u32 nData) { u8 buf[nData + 2]; u32 i; buf[0] = CAN_READ_REG_CMD; buf[1] = reg; XSpi_Transfer(&InstancePtr->CANSpi, buf, buf, nData + 2); for (i = 0; i < nData; i++) data[i] = buf[nData + 2]; } What is the best way to do a multi-byte SPI transaction? Thanks, Mirco
  2. mbo

    Zybo and PmodCAN

    Hi @jpeyron, I found out that I am not using the latest release of Pmod CAN ip core. First, thank you for that information. Lets say we have following scenario. Board A wants to send a message to Board B. On Board A Pmod CAN is connected but on Board B not. So Board A tries to send a message but it will never be received by Board B. The shown code snipped for checking status exists immediately the loop but message has never been received by Board B or transmitted successfully. The check of an additional status register you mentioned is also the approach of my choice. So am I correct that I need to extend the status check in mentioned loop above? For example like... do { status = CAN_ReadStatus(&pmod); } while ((status & CAN_STATUS_TX0IF_MASK) != 0 && (status & OTHER_REG_MASK) != 0); What do you mean with full interrupt mode? You mean ISR process? Thank you for your advices and I will try to get further information from other registers. Thanks, Mirco
  3. mbo

    Zybo and PmodCAN

    Hi @JColvin, @jpeyron, @artvvb, How can I check the Acknowledge Bit to make sure transmission of message was successful? I know there is this check but it wont work when PmodCAN on receiver board is disconnected. CAN_SendMessage(&pmod, TxMessage, CAN_Tx0); CAN_ModifyReg(&pmod, CAN_CANINTF_REG_ADDR, CAN_CANINTF_TX0IF_MASK, 0); do { status = CAN_ReadStatus(&pmod); } while ((status & CAN_STATUS_TX0IF_MASK) != 0); Thanks, Mirco
  4. Hi @jpeyron Yes, I have looked at these pages but I dont really understand what a Watchdog Timer is and what it is for. Is my understanding correct that ISR increments ticks which is a single step in RTOS and switches tasks between those ticks? Is there a good tutorial how to implement ISR and use it with several tasks? Thanks, Mirco
  5. Hello guys, I am using Zybo Z7-10 and want to use a timer which polls e.g. every 100ms by starting a task in freertos. What is the best way to implement such timer? Do I need to use XScu_Timer or Global Timer or Watchdog Timer Thanks, Mirco
  6. mbo

    Zybo and PmodCAN

    Hi @Notarobot, @JColvin, @jpeyron, Can is working! Also with breakout board and PmodCAN. To my shame, I have to confess that I have used wrong d-sub cable all time. With tips from Notarobot I tried to implement can with breakout board which worked at first moment. After that success I tried other d-sub cable for PmodCAN and now both ways are working. Thank you guys for all your help. You're the best! Thanks and cheers, Mirco
  7. mbo

    Zybo and PmodCAN

    Hi @Notarobot, I have searched for JF port configuration in Digilent and Xilinx forum but found nothing. Where can I find it? Thanks, Mirco
  8. mbo

    Zybo and PmodCAN

    Hi @JColvin I monitored the loopback demo and in the receiving part of that demo the ReadStatus-function is returning value 9 as status. With that status the switch-case statement is switching between receiving message from buffer 0 or 1. But if status is not 9 an error is returned by switch-case statement. Next step was to use Rx.c example code which starts at mentioned ReadStatus-function and switch-case statement afterwards. To get it work the ReadStatus-function needs to return 9 as status. I will take a look at the pages you mentioned. Thanks, Mirco
  9. mbo

    Zybo and PmodCAN

    In addition, I have another question... When I use the source files Tx.c and Rx.c from PmodCAN source directory is there any way I can find out how to set PmodCAN to specific status? In Tx.c and Rx.c following function is used several times to check current status of CAN but at beginning of Rx.c the status is not correct and I want to set it by myself. status = CAN_ReadStatus(&myDevice); Does anyone know which registers I have to set at specific value to get specific status? Thanks, Mirco
  10. mbo

    Zybo and PmodCAN

    Thank you all for help and further information, @jpeyron do you mean design wrapper? To answer your question about input for can I'll try to describe the structure. I use two Zybo-Z7 boards and each board has one Pmod CAN Transceiver connected to Pmod port JE. The Pmod CAN Transceiver of both boards are connected together via d-sub 9-pin cable. One board has Tx.c example source of Pmod CAN implemented and other board has Rx.c source implemented. @Notarobot I understand that the way I've chosen may not be the easiest and I am thankful for your advices. The breakout-board you presented has an onboard can transceiver and is I think not different to Pmod CAN from Digilent where I also have the option simply to connect wires. Both ways should work. Thank you My goal is that two boards are connected to each other via two CAN lines and in case of a failure of one line the connection between these boards is switched automatically to the other CAN line. But this one is far away and first I need CAN to get work correctly by sending messages from one board to other board. Thanks, Mirco design_wrapper.txt
  11. mbo

    Zybo and PmodCAN

    Hi @jpeyron, thank you for the hint of updated board files. I am using Pmod port JE on my Zybo-Z7 and the port assignment in my constraint file is following: ##Pmod Header JE set_property -dict { PACKAGE_PIN V12 IOSTANDARD LVCMOS33 } [get_ports { pmod_out_pin1_io }]; #IO_L4P_T0_34 Sch=je[1] set_property -dict { PACKAGE_PIN W16 IOSTANDARD LVCMOS33 } [get_ports { pmod_out_pin2_io }]; #IO_L18N_T2_34 Sch=je[2] set_property -dict { PACKAGE_PIN J15 IOSTANDARD LVCMOS33 } [get_ports { pmod_out_pin3_io }]; #IO_25_35 Sch=je[3] set_property -dict { PACKAGE_PIN H15 IOSTANDARD LVCMOS33 } [get_ports { pmod_out_pin4_io }]; #IO_L19P_T3_35 Sch=je[4] set_property -dict { PACKAGE_PIN V13 IOSTANDARD LVCMOS33 } [get_ports { pmod_out_pin7_io }]; #IO_L3N_T0_DQS_34 Sch=je[7] set_property -dict { PACKAGE_PIN U17 IOSTANDARD LVCMOS33 } [get_ports { pmod_out_pin8_io }]; #IO_L9N_T1_DQS_34 Sch=je[8] set_property -dict { PACKAGE_PIN T17 IOSTANDARD LVCMOS33 } [get_ports { pmod_out_pin9_io }]; #IO_L20P_T3_34 Sch=je[9] set_property -dict { PACKAGE_PIN Y17 IOSTANDARD LVCMOS33 } [get_ports { pmod_out_pin10_io }]; #IO_L7N_T1_34 Sch=je[10] Thanks, Mirco
  12. mbo

    Zybo and PmodCAN

    Hi @jpeyron, yes exactly. I am using a d-sub 9-pin zero modem cable to connect them. The weird thing is that the loopback demo is working which means that pmod hardware is working fine. I suggest the pin assignment is not correct wether in the cable or in vivado. But I have no idea how to check the pin assignment in the cable. I did not found a d-sub cable with 9 pin socket in digilent store. The error in rx program is that it fails to check the CAN status. When I connect two pmod CANs together via cable do I have to set the jumper on pmod at specific position? Thanks, Mirco
  13. mbo

    Zybo and PmodCAN

    @BogdanVanca and @artvvb, after a long time I got my Zybo Z7-Boards and Pmod CAN. The loopback-demo is working fine and my next step was to implement the Rx.c and Tx.c from Pmod_CAN source. But there is one problem... In Rx.c the status is always "Error, message not received" but I dont know what the cause of the problem is. Thanks, Mirco
  14. mbo

    Pmod SSD

    @artvvb Thank you for that information. I think I've missed it. Unfortunately thats what I thought. Thanks, Mirco
  15. mbo

    Pmod SSD

    Hey @JColvin and @artvvb, if I want to set e.g. the number "1" for the seven-segment display I use the command: XGpio_DiscreteWrite(&output, 1, 0b00000110); the number will show on the right display, but if I change the "first" digit to 1 which means: XGpio_DiscreteWrite(&output, 1, 0b10000110); the number will be shown on the left display. Is there any chance I can show the number "10" with both displays, this means "1" on left display and "0" on right display? Thanks, Mirco