BRT Community

Please login or register.

Login with username, password and session length
Advanced search  

News:

Welcome to the Bridgetek Community!

Please read our Welcome Note

Technical Support enquires
please contact the team
@ Bridgetek Support

Please refer to our website for detailed information on all our products - Bridgetek - Bridging Technology

Author Topic: BT817 external clock not turning on  (Read 8442 times)

alex_mart

  • Newbie
  • *
  • Posts: 3
    • View Profile
BT817 external clock not turning on
« on: May 12, 2022, 07:35:15 PM »

I am working with the Riverdi EVE4 display RVT70HSBNWC00B and I noticed when using the Riverdi recommended initialization values that I was getting a wierd flicker when drawing using primitives.
I have used both the Riverdi examples and Rudolphsexamples and both give the same behavior. (https://github.com/RudolphRiedel/FT800-FT813 https://github.com/riverdi/riverdi-eve)
It seems like the PCLK never gets set to the frequency we want.
We verified the PCLK frequency by proving the PCLK frequency with an oscilloscope.

When using Riverdi’s recommended settings the PCLK should be 51MHz but instead we found it to be 30MHz.
When using the change I made pushing the PCLK up to what should be 60MHz the PCLK was about 33MHz when probing.
This does fix the flickering though.
At this setting as long as I’m not rendering from flash the screen looks flawless.

We also found that with BOTH settings the external 12MHz oscillator never turned on! 😲
This is really confusing because the revised version of the bt817/8 datasheets don’t even have an option for an internal oscillator so I'm surprised it's even successfully displaying anything...
We were able to determine that the oscillator is functional by using one of bridgetek’s usb-to-spi boards I use to update the display flash.
When using the EVE Asset Builder tool and the usb-to-spi FT232, when it reads the flash of the display the 12MHz oscillator turns on.

Is there something I am missing??
I would think the following code should enable the external oscillator:
Code: [Select]
   
    // reset display
    HAL_GPIO_WritePin((GPIO_TypeDef*)nDispRst_GPIO_Port, nDispRst_Pin, GPIO_PIN_RESET);
    HAL_Delay(10u); /* 10 millisecond delay */
    HAL_GPIO_WritePin((GPIO_TypeDef*)nDispRst_GPIO_Port, nDispRst_Pin, GPIO_PIN_SET);
    HAL_Delay(25u);

    // setup display system clock
    host_cmd(HCMD_CLKEXT, 0u);/* Host Command Select External CLock */
    host_cmd(HCMD_CLKSEL, SYSCLK_72M);
    host_cmd(HCMD_ACTIVE, 0u); /* set state to active */

    // 300 millisecond delay
    HAL_Delay(300u);

I have tried changing the delays and adding more in between the host commands and nothing changes.
Logged

BRT Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 733
    • View Profile
Re: BT817 external clock not turning on
« Reply #1 on: May 13, 2022, 12:47:59 PM »

Hello,

Thank you for your post, can I get you to try the following in your initialization routine:

Code: [Select]
       
    // reset display
    HAL_GPIO_WritePin((GPIO_TypeDef*)nDispRst_GPIO_Port, nDispRst_Pin, GPIO_PIN_RESET);
    HAL_Delay(10u); /* 10 millisecond delay */
    HAL_GPIO_WritePin((GPIO_TypeDef*)nDispRst_GPIO_Port, nDispRst_Pin, GPIO_PIN_SET);
    HAL_Delay(25u);


    // setup display system clock
    host_cmd(HCMD_CLKEXT, 0u);/* Host Command Select External CLock */
    HAL_Delay(20u);

    host_cmd(HCMD_CLKSEL, SYSCLK_72M);
    HAL_Delay(20u);

    host_cmd(HCMD_ACTIVE, 0u); /* set state to active */
    HAL_Delay(20u);

    host_cmd(HCMD_RST_PULSE, 0u); /* send the reset pulse to eve */


    // 300 millisecond delay
    HAL_Delay(300u);

We have recently had a discussion with the development team which indicates the RST_PULSE is require after configuring the clocks for the device. The added delays shouldn't be necessary but can be useful for testing, please let me know if you are still seeing the same behaviour with the change.

Best Regards,
BRT Community
« Last Edit: May 13, 2022, 12:58:58 PM by BRT Community »
Logged

Rudolph

  • Sr. Member
  • ****
  • Posts: 389
    • View Profile
Re: BT817 external clock not turning on
« Reply #2 on: May 13, 2022, 01:05:04 PM »

I do have a RVT70HSBNWC00-B up and running on my desk right now and it is doing just fine, strange.
My setup is for 51MHz PCLK to get about 60Hz, if that would not be working I would get flickering as well since
my display-refresh is at 50Hz.

I just added measuring the frequency and frames per second to this project and it works as expected.

Code: [Select]
delay_s1++;
if(delay_s1 > 199)
{
 delay_s1 = 0;
 eve_frames_new = EVE_memRead32(REG_FRAMES);
 eve_frames = eve_frames_new - eve_frames_old;
 eve_frames_old = eve_frames_new;

 eve_frequency_new = EVE_memRead32(REG_CLOCK);
 eve_frequency = eve_frequency_new - eve_frequency_old;
 eve_frequency_old = eve_frequency_new;
}

This is executed every 5ms so the the values are measured once a second.

And then I just display it:
EVE_cmd_text_var_burst(500, 100, 28, EVE_OPT_FORMAT, "Frequency: %d",1,eve_frequency);
EVE_cmd_text_var_burst(500, 130, 28, EVE_OPT_FORMAT, "Frames/s : %d",1,eve_frames);

The result right now is:
Frequency: 72003998 to 72004409
Frames/s: 59 or 60


What controller are you using?

And can you rule out electrical issues?
My board is using two step down regulators, one for the 3.3V logic and one for the 5V backlight.
At only 0x30 for the backlight and with 7V from my PSU the display plus controller-board is drawing 310mA right now.
Setting the backlight to 0x00 and confirming with a flashlight that the display is still up and running, the current drops to 154mA.
So the 3.3V path needs around 300mA and the 5V path needs around 200mA.
« Last Edit: May 13, 2022, 03:38:01 PM by Rudolph »
Logged

Rudolph

  • Sr. Member
  • ****
  • Posts: 389
    • View Profile
Re: BT817 external clock not turning on
« Reply #3 on: May 13, 2022, 02:11:15 PM »

We have recently had a discussion with the development team which indicates the RST_PULSE is require after configuring the clocks for the device.

Missed this one, for what device exactly?
I never had an issue not sending RST_PULSE with FT800, FT801, FT810, FT813, BT815 or BT817.

Ok, to clarify, I never had an issue not sending RST_PULSE as long as my hardware was using the PD pin to do a reset first.
For the very rare case that I had the PD pin not connected I was issuing a RST_PULSE as the first command, not after ACTIVE.

And checking the Programming Guide, the first time this is mentioned is the BT81x Programming Guide version 2.2 - so only very recently.
Logged

BRT Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 733
    • View Profile
Re: BT817 external clock not turning on
« Reply #4 on: May 13, 2022, 04:49:22 PM »

Hi Rudolph,

They had advised this recently for the BT817/8 series of EVE, its mostly a precautionary step for previous revisions but we advise customers to do this now in any case.

Best Regards,
BRT Community
Logged

alex_mart

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: BT817 external clock not turning on
« Reply #5 on: May 13, 2022, 04:57:21 PM »

Hello,

Thank you for your post, can I get you to try the following in your initialization routine:

Code: [Select]
       
    // reset display
    HAL_GPIO_WritePin((GPIO_TypeDef*)nDispRst_GPIO_Port, nDispRst_Pin, GPIO_PIN_RESET);
    HAL_Delay(10u); /* 10 millisecond delay */
    HAL_GPIO_WritePin((GPIO_TypeDef*)nDispRst_GPIO_Port, nDispRst_Pin, GPIO_PIN_SET);
    HAL_Delay(25u);


    // setup display system clock
    host_cmd(HCMD_CLKEXT, 0u);/* Host Command Select External CLock */
    HAL_Delay(20u);

    host_cmd(HCMD_CLKSEL, SYSCLK_72M);
    HAL_Delay(20u);

    host_cmd(HCMD_ACTIVE, 0u); /* set state to active */
    HAL_Delay(20u);

    host_cmd(HCMD_RST_PULSE, 0u); /* send the reset pulse to eve */


    // 300 millisecond delay
    HAL_Delay(300u);

We have recently had a discussion with the development team which indicates the RST_PULSE is require after configuring the clocks for the device. The added delays shouldn't be necessary but can be useful for testing, please let me know if you are still seeing the same behaviour with the change.

Best Regards,
BRT Community

Unfortunately I am still seeing the same behavior  :(
Logged

Rudolph

  • Sr. Member
  • ****
  • Posts: 389
    • View Profile
Re: BT817 external clock not turning on
« Reply #6 on: May 13, 2022, 05:12:51 PM »

Odd.
Well, my sample size is really small but no issue here.
And I also had no bug-reports regarding startup issues.

I have to test the impact of this extra reset, I do not like the idea that it probably adds some extra 20+ms to the startup.
Logged

alex_mart

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: BT817 external clock not turning on
« Reply #7 on: May 13, 2022, 06:19:29 PM »

I do have a RVT70HSBNWC00-B up and running on my desk right now and it is doing just fine, strange.
My setup is for 51MHz PCLK to get about 60Hz, if that would not be working I would get flickering as well since
my display-refresh is at 50Hz.

I just added measuring the frequency and frames per second to this project and it works as expected.

Code: [Select]
delay_s1++;
if(delay_s1 > 199)
{
 delay_s1 = 0;
 eve_frames_new = EVE_memRead32(REG_FRAMES);
 eve_frames = eve_frames_new - eve_frames_old;
 eve_frames_old = eve_frames_new;

 eve_frequency_new = EVE_memRead32(REG_CLOCK);
 eve_frequency = eve_frequency_new - eve_frequency_old;
 eve_frequency_old = eve_frequency_new;
}

This is executed every 5ms so the the values are measured once a second.

And then I just display it:
EVE_cmd_text_var_burst(500, 100, 28, EVE_OPT_FORMAT, "Frequency: %d",1,eve_frequency);
EVE_cmd_text_var_burst(500, 130, 28, EVE_OPT_FORMAT, "Frames/s : %d",1,eve_frames);

The result right now is:
Frequency: 72003998 to 72004409
Frames/s: 59 or 60


What controller are you using?

And can you rule out electrical issues?
My board is using two step down regulators, one for the 3.3V logic and one for the 5V backlight.
At only 0x30 for the backlight and with 7V from my PSU the display plus controller-board is drawing 310mA right now.
Setting the backlight to 0x00 and confirming with a flashlight that the display is still up and running, the current drops to 154mA.
So the 3.3V path needs around 300mA and the 5V path needs around 200mA.

I am using an STM32H750.
I don't think it is an electrical power issue.
This is a custom PCB that has been thoroughly tested.
You can never truly rule out hardware with embedded software but I'd say it's unlikely.
Logged

Rudolph

  • Sr. Member
  • ****
  • Posts: 389
    • View Profile
Re: BT817 external clock not turning on
« Reply #8 on: May 16, 2022, 05:38:50 PM »

I am using an STM32H750.

Ok, I do not have anything solid for STM32, at least not HAL driven.
This is a blind-spot I would like to address but there are very few STM32 I could use since
I usually need CAN-FD.
Currently most STM32 are unobtanium anyways.
Mouser lists 209 "STM32H" and in stock are three BGA variants.
Then there are 1459 "STM32F" listed with 8 in stock - also only BGA.
Well, maybe in Q4 next year.



Logged