News:

Attention: For security reasons,please choose a user name *different* from your login name.
Also make sure to choose a secure password and change it regularly.

Main Menu

No I2C Ack from Si5338 of TE0712

Started by taweechai, July 16, 2019, 06:42:13 AM

Previous topic - Next topic

taweechai

I have an Artix-7 TE0712 module on a TE0703-05 carrier board, and I need to change one of the output frequencies (aiming at CLK3) of SI5338 to 200Mhz using VHDL on ISE (rather than modifying a program on the firmware based on linux which I am not familiar and it might take too much time for me to learn). I have tried to change it for several weeks by using the I2C master module for SI5338 (as in https://github.com/steffenmauch/SI5338-VHDL), but it is always error due to no I2C acknowledge from SI5338 as you can see in the picture https://drive.google.com/open?id=1WT0FF2Vksr1fZv6rzExwEsUfVvvYeBCW. I wrote the the address "E6" with "10" (Si5338 slave address is 111_0000). Then, I tried to communicate to an I2C sensor to verify the I2C master module, and it worked well (https://drive.google.com/open?id=1gnh8oGgzzHzRsBX96llH65cG5pZBEacc). (The slave address is 111_0111.) The weird thing is when I ignored the acknowledge bit and disabled OEB (OEB_ALL = 1), the output frequencies were disabled! What I can only guess is the SI5338 is broken, even I just open the box of TE0712! I have tried to reduce the I2C SCK frequency from 400k to 10k, and it still does not work.

These liens are in the ucf file I set for I2C:
NET SI5338_SDA  LOC = T20  |  IOSTANDARD = LVCMOS33 | PULLUP;
NET SI5338_SCL  LOC = W21  |  IOSTANDARD = LVCMOS33 | PULLUP;

Does anyone have any advice?


taweechai

Thank for quick reply. But I am afraid that the answer is not what I expected because I am not using microblaze. Also I believe that the way to communicate to Si5338 directly is more straightforward. I haven't even started changing the frequencies. I just send an instruction to Si5338, and it did not respond by acknowledgement. BTW, I have erased linux from the memory for recalling artix resource back.

I remember that at the first time I connected to petal linux (obtained from the image from the site you suggest), it showed something relevant with Ethernet cannot finish task and repeatedly showed time out. However, since I do not need the linux, I do not mind. However, this should not be the issue to Si5338 I guess.

Or should I implement with petallinux only? It may take a lot of time for me to learn for a work do not need it.

JH

Linux is running on the bigger microblaze and use the ddr, on the small one (MCU) only a small baremetal app  is running (use  bram , not ddr), which uses i2c over gpio to configure SI and release reset for  rest of the system.
This baremetal app use the generated c header with register configuration from SI tools, so you can easy generate your own setup with SI tools and overwrite this one from this application.

So petalinux is not needed to reconfigure SI.

br
John

taweechai

I am living in such a small world of me, thanks to open my world! Actually I have looked through the sw_apps, but since it is .c and .h files, I thought they have to be compiled in linux only. I also found that there are many included .h files required to compile as well. Then I think there much have a specific compiler designed for them.

So, could you give me advice how to compile these files and how to include to my .bit file. I have read https://wiki.trenz-electronic.de/display/PD/SDK+Projects , I am not sure it is relevant or not. BTW, the information in this url is too little for the beginner like me.


JH

Hi,
1. Instantiate the same MCU in your project (use settings of this IP (maybe enable JTAG debugger for mcu, when you want to debug c code on the running system) and loc constrains from the reference constrains ).
2. Create  Bitstream and export HDF to SDK
3. Include SCU template from the reference design as local lib (see https://wiki.trenz-electronic.de/display/PD/SDK+Projects#SDKProjects-Variant(b):UseXilinxGUIExport)
4.  Create "SCU" application,  important: Select MCS Microblaze and SCU Application
5. Select Release Built (maybe for Debug, you must increase BRAM for MCU)
6. Regenerate App and include elf into bitfile --> use SDK or Vivado
7. try out

or you start with our reference design (--> ignore linux part, there is also an hello TE0712 included), if this is running, remove all stuff you did not need and add your ips.

To change SI setup:
1. Open the SI project of the Reference Design with SI tools: https://wiki.trenz-electronic.de/display/PD/TE0712+Test+Board#TE0712TestBoard-SI5338
2. Modify  CLKs and export config c header
3. replace config c header of the SCU project and regenerate elf and bitstream again.

br
John

taweechai

Thank you very much. Even though I am still figuring out what I have to do (and cope with problems in my project), I am very appreciated. I can see the overall steps to do.

However, what is the "Release" in 5. Is there a particular meaning? - or it is just versioning system?

I am now trying on the reference project, and these are the steps (for anyone who may be a newbie like me) - it may and may not work, because I am still sorting out some problems in my project:
1. Generate HDF: In Vivado, File -> Export -> Hardware (I am still encountering with this - it says "no gerenated IPI blocks")
2. Create ELF: In SDK, just create a project  by selecting the exported HDF
3. Create SCU application: Do step 3, as John suggested. -- No sure about "Select Release Built"
4. Regenerate App: Select the BSP project  and Run (may be with the option "Launch on Hardware (System Debugger)")
5. Include elf into bit file:
5.1) In SDK, Xilinx -> Program FPGA and in the Software Configuration, select the elf file OR
5.2) In Vivada -> Include elf file into the top module

Thanks a lot, again!

JH

Hi,
you can create elf file  as "Release" or "Debug" --> Release builds are much smaller and you can't step during to code with debugger.

Sorry I can't give step by step tutorials --> try out a little bit an Xilinx provide a lot of videos and documentation to work with FPGA. Try out is the best way to learn and understand FPGA system.
to step 1 --> generate bitfile when this step is finished export hdf+bitfile to SDK and include the SCU template  https://wiki.trenz-electronic.de/display/PD/SDK+Projects#SDKProjects-Variant(b):UseXilinxGUIExport

to Step 3: --> it's like https://wiki.trenz-electronic.de/display/PD/SDK+Projects#SDKProjects-CreateSoftwareApplicationwithSDKTemplate but select for processor the MCU and on the second Window (where is the example sceenshot hello world is selected) select the SCU firmware. A project is now visible on the explore tap right clk on the project name and you has a lot of option --> one is build option where you can change between release and debug --> default it should be debug. You can still let it as debug, but in case he tell you he can't map it, you must increase bram of the mcu and start again from step 1.
br
John

simon.beaudoin

I just wanted to let you know that your issue happened with one of our TE0803 too; the si5338 chip would not acknowledge when talking to it. Linux would fail to talk to it, but using lower level techniques and ignoring ack bit, the chip would then behave correctly.... So you're not completely crazy ;p

taweechai

Sad to hear that I am not the only one who suffering with this problem. I am still unable to communicate with SI5338, and now I have to use software clock generator instead (and hope it will go well). BTW, I am wondering, how can you program SI5338 without using acknowledge bit? I want to change the clock frequency, and the SI5338 instruction tells me to read some register values before going to the next step. May be it is only my case, I even didn't receive any value back from SI5338. However, I can write register e.g. for disabling outputs by ignoring acknowledge bit (as you have said).

simon.beaudoin

we used a microcontroller. I should have completed my previous post by saying that the chip on that som eventually died and one of the clock output didnt worked. at the end we ordered a new chip and replaced it on the som. we had electrical issued on our first carrier design and now corrected them, maybe the chip suffered from an electrical glitch.

JH

Hi,
@simon: on TE0803 we use Xilinx lib, on TE0712 we use or own C program for I2C access to SI5338, both check ACK bit. In case it does receive ACK, it returns error code. in case you has still problems (after replace), can you try out our reference design  with carrier please?
@taweechain: Which module did you use? We provide reference designs for the most modules, which configure SI5338 over I2C. Did you try out this designs(prebuilt binaries are included)?

br
John