Jump to content

Bogy

Members
  • Posts

    17
  • Joined

  • Last visited

Recent Profile Visitors

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

Bogy's Achievements

Member

Member (2/4)

0

Reputation

  1. Hello, I spent quite a lot of time trying to generate a petalinux for this board. I had to modify the *.bb files to be able to compile them with v2024, but I cannot access the IPs declared in Vivado. I tried several variations in system-user.dtsi. For example, with the commented ones it does not boot - and I did not find details in the logs. I have attached archives with files to regenerate the test project. Thanks for any help, Bogdan linux_cz7_20240909.zip vivado_cz7_20240909.zip
  2. Hi Ionel, I'm studying the sources, but I expected to find specifications more easily in the documentation, which is either for older versions of Vitis/Vivado or doesn't even exist: https://digilent.com/reference/reference/programmable-logic/cora-z7/demos/petalinux This repository is for v2021 and 'Cora Z7-07S Base Linux Design' for v2017 I managed to import it in v2024, with the exception of ip/system_pwm_rgb_0 For the project I'm working on, I need to create a customized version and I hope to find help on the forum because it seems I'll need it a lot :). Thank you, Bogdan
  3. Hello, I haven't gotten to the questions yet, it's just an opinion - from a beginner (ok - I have over 25 years of experience in c++, but not in this domain) Yes, it's probably easy to guess, I'm not an expert in linux - but I have to develop a project on this board, and besides FreeRTOS, I'm also evaluating the possibility of developing it in PetaLinux. And this is where the torment begins, install the latest version of Ubuntu in VirtualBox only to find out that it is not compatible with the latest version of PetaLinux. Looking for version 22.04.3 LTS, only to find out that it is not fully compatible with the latest version of VirtualBox, and the 'Guest Addition' installation does not quite work as expected. I installed all the dependencies, which are not specified from the beginning, and I didn't even find a script to automate this, and bravely started to compile the project, only to get some bizarre errors (in a cryptic and long message) related to cpu1. Very bizarre, especially since this board has only one cpu. I'll let you guess how many days it took me to find a solution, especially since all the dts/dtsi files looked fine, except for a detail related to debugging ... I don't know if I'm the only one who encountered this problem, but the solution I found to be able to compile the project is the following: In the directory: components/plnx_workspace/device-tree/device-tree I created a file "system-user.dtsi" with the content: /include/ "system-conf.dtsi" / { }; &amba { ptm@f889d000 { cpu = <&cpu0>; }; }; I hope it will be useful for other beginners who try PetaLinux on boards with a single cpu. A+, Bogdan
  4. Bogy

    Cora Z7 07S - i2c

    Vitis 2024.1
  5. Bogy

    Cora Z7 07S - i2c

    Probably yes. I tested in a bare metal application.
  6. Bogy

    Cora Z7 07S - i2c

    With pleasure. I also struggled for a while until something worked.
  7. Bogy

    Cora Z7 07S - i2c

    Hello, I managed to use I2C but not with AXI_IIC. In PS I activated IIC_0 and made the pins external. After that I set them in .xdc ## ChipKit I2C set_property -dict { PACKAGE_PIN P16 IOSTANDARD LVCMOS33 } [get_ports { IIC_0_0_scl_io }]; #IO_L24N_T3_34 Sch=ck_scl set_property -dict { PACKAGE_PIN P15 IOSTANDARD LVCMOS33 } [get_ports { IIC_0_0_sda_io }]; #IO_L24P_T3_34 Sch=ck_sda In the application I used XIicPs - and it works. Why it doesn't work with AXI_IIC, I don't know - especially since this is the option that is proposed in Vivado if I2C is checked in the Board tab. If anyone needs it, I have attached an archive with some functions that I have implemented to display information on an I2S Oled screen using the u8g2 library. Thank you, Bogdan u8x8_cora_z7.zip
  8. Bogy

    Cora Z7 07S - pwm

    Hello, I generated the same project in Vitis Classic and it worked. I finally found the problem. In Vivado, I initially made a configuration, after which I kept adding additional IPs and pins. Although I regenerated the bitstream every time and in Vitis I gave "Switch XSA" + clean both on the application and on the platform, it seems that they did not regenerate - and practically the application worked on the first version of the platform. In Vitis Classic, it automatically finds drivers\PWM_v1_0\src\PWM.h (.c), in Vitis Unified IDE it does not, instead it is much simpler to mix cpp and c code. In both I2C does not work. I also made an additional project only with PS and I activated I2C0 and I use XIicPs - I can't test anything on i2c. Thanks in advance for any suggestion related to project settings and i2c. Thanks, Bogdan
  9. Bogy

    Cora Z7 07S - pwm

    Hey Arthur, I have attached main.cpp - main.cpp The commented code is for an I2C test for which I created another post the other day - that one doesn't work for me either :(. The Block Design in Vivado is: Thank you, Bogdan
  10. Bogy

    Cora Z7 07S - pwm

    Hi Arthur, Thanks for the reply. On the Vitis side, I think it will be easier to find solutions. As I am at the beginning and do not know either of the two environments, I chose Vitis 2024 (2023 initially) because it resembles VSCode and I have the impression that I navigate more easily between the sources and the included files. I think that I am doing something wrong in Vivado, probably because until now I have only programmed microcontrollers and I have not dealt with the hardware architecture. If more information is needed, I can provide it. // pwm constexpr u32 pwm_clocks = 102041; constexpr u32 pwm_scale = 400; constexpr u32 u_sec = 10000; void RGBLED_SetColor(u8 r, u8 g, u8 b) { PWM_Set_Duty(XPAR_PWM_0_BASEADDR, pwm_scale * b, 0); PWM_Set_Duty(XPAR_PWM_0_BASEADDR, pwm_scale * g, 1); PWM_Set_Duty(XPAR_PWM_0_BASEADDR, pwm_scale * r, 2); } void Motor_SetSpeed(u8 speed) { PWM_Set_Duty(XPAR_PWM_0_BASEADDR, pwm_scale * speed, 3); } void PWM_Init() { // Set PWM period to 102041 for a frequency of approximately 490 Hz (arduino) PWM_Set_Period(XPAR_PWM_0_BASEADDR, pwm_clocks); RGBLED_SetColor(0, 0, 0); Motor_SetSpeed(0); PWM_Enable(XPAR_PWM_0_BASEADDR); } u8 c = 0; for (c = 0; c < 255; c++) { RGBLED_SetColor(0, 0, c); usleep(u_sec); } RGBLED_SetColor(0, 0, 0); for (c = 0; c < 255; c++) { Motor_SetSpeed(c); usleep(u_sec); } Motor_SetSpeed(0); Led is ok, 0 on dp4. Thank you, Bogdan
  11. Bogy

    Cora Z7 07S - pwm

    Hello everyone, I posted this question a few days ago and added some updates since then. I would really appreciate any help or guidance on this matter. Thank you in advance!
  12. Bogy

    Cora Z7 07S - i2c

    Hello, I tried to add an IP AXI interrupt controller, but still nothing changes. Appreciate any hint Thank you, Bogdan
  13. Bogy

    Cora Z7 07S - pwm

    Hello, I continued with the tests and encountered another problem. I set PWM to contain 4 channels and an AXI GPIO also with 4 channels. .xdc: ## RGB LEDs set_property -dict { PACKAGE_PIN L15 IOSTANDARD LVCMOS33 } [get_ports { pwm[0] }]; #IO_L22N_T3_AD7N_35 Sch=led0_b set_property -dict { PACKAGE_PIN G17 IOSTANDARD LVCMOS33 } [get_ports { pwm[1] }]; #IO_L16P_T2_35 Sch=led0_g set_property -dict { PACKAGE_PIN N15 IOSTANDARD LVCMOS33 } [get_ports { pwm[2] }]; #IO_L21P_T3_DQS_AD14P_35 Sch=led0_r #pwm on dp4 set_property -dict { PACKAGE_PIN V17 IOSTANDARD LVCMOS33 } [get_ports { pwm[3] }]; #IO_L21P_T3_DQS_34 Sch=ck_io[4] set_property -dict { PACKAGE_PIN U14 IOSTANDARD LVCMOS33 } [get_ports { gpio_dp0_dp3_tri_o[0] }]; #IO_L11P_T1_SRCC_34 Sch=ck_io[0] set_property -dict { PACKAGE_PIN V13 IOSTANDARD LVCMOS33 } [get_ports { gpio_dp0_dp3_tri_o[1] }]; #IO_L3N_T0_DQS_34 Sch=ck_io[1] set_property -dict { PACKAGE_PIN T14 IOSTANDARD LVCMOS33 } [get_ports { gpio_dp0_dp3_tri_o[2] }]; #IO_L5P_T0_34 Sch=ck_io[2] set_property -dict { PACKAGE_PIN T15 IOSTANDARD LVCMOS33 } [get_ports { gpio_dp0_dp3_tri_o[3] }]; #IO_L5N_T0_34 Sch=ck_io[3] I can set 0/1 on dp0..3 and control the right rgb led with pwm, but on dp4 - I have no pwm signal. Where am I wrong? I hope I'm on the correct forum and section? :) Thank you, Bogdan
  14. Bogy

    Cora Z7 07S - i2c

    Hello, I'm trying to display information on an OLED screen via I2C. In Vivado -> Board I checked "Shield I2C on J3" and made the necessary settings in .xdc But it doesn't seem to work, if I try to scan the devices it gets stuck at 0x3C and until then it says that all the addresses are connected. XIic_Send(XPAR_AXI_IIC_0_BASEADDR, address, NULL, 0, XIIC_STOP) If I use XIIC_REPEATED_START it does not block but detects all addresses as connected. Also, the XIic_SelfTest function blocks the execution. I would appreciate any suggestions. Thank you, Bogdan
  15. Bogy

    Cora Z7 07S - pwm

    Hi, Finally I found the example that uses ADC. In Vitis 2024 it cannot be imported, but I was able to draw inspiration from there. In Vivado I added "Digilent Vivado Library" and used the PWM IP from there. When generating the platform, the PWM.h and PWM.c is generated. \export\platform_03\hw\sdt\drivers\PWM_v1_0\src\PWM.h sw\standalone_ps7_cortexa9_0\hw_artifacts\drivers\PWM_v1_0\src\PWM.h But these files are not found either by include or by the linker. I copied them into the application, but what would be the correct method to add them from the platform (in Vitis 2024)? Thank you, Bogdan
×
×
  • Create New...