{"action":"created","issue":{"url":"https://api.github.com/repos/MatrixPilot/MatrixPilot/issues/46","repository_url":"https://api.github.com/repos/MatrixPilot/MatrixPilot","labels_url":"https://api.github.com/repos/MatrixPilot/MatrixPilot/issues/46/labels{/name}","comments_url":"https://api.github.com/repos/MatrixPilot/MatrixPilot/issues/46/comments","events_url":"https://api.github.com/repos/MatrixPilot/MatrixPilot/issues/46/events","html_url":"https://github.com/MatrixPilot/MatrixPilot/pull/46","id":173588079,"number":46,"title":"AUAV3: Prevent intermittent non-startup of telemetry.","user":{"login":"phollands","id":542066,"avatar_url":"https://avatars.githubusercontent.com/u/542066?v=3","gravatar_id":"","url":"https://api.github.com/users/phollands","html_url":"https://github.com/phollands","followers_url":"https://api.github.com/users/phollands/followers","following_url":"https://api.github.com/users/phollands/following{/other_user}","gists_url":"https://api.github.com/users/phollands/gists{/gist_id}","starred_url":"https://api.github.com/users/phollands/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phollands/subscriptions","organizations_url":"https://api.github.com/users/phollands/orgs","repos_url":"https://api.github.com/users/phollands/repos","events_url":"https://api.github.com/users/phollands/events{/privacy}","received_events_url":"https://api.github.com/users/phollands/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-08-27T09:39:42Z","updated_at":"2016-08-27T10:58:21Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/MatrixPilot/MatrixPilot/pulls/46","html_url":"https://github.com/MatrixPilot/MatrixPilot/pull/46","diff_url":"https://github.com/MatrixPilot/MatrixPilot/pull/46.diff","patch_url":"https://github.com/MatrixPilot/MatrixPilot/pull/46.patch"},"body":"About 1 to 2 times in every 10 times, the telemetry from the AUAV3 to the OpenLog was not starting. Extensive investigations showed that TX interrupt handler was firing and placing chars in the FIFO queue, but a logic analyser showed absolutely no bits were coming from the telemetry UART.\r\n\r\nLooking for differences between the AUAV3 and other boards, I noted that the clock of the AUV3 was setup differently when using the XC16 compiler. This non startup fault of the telemetry seems to have only been noticed by myself and Kees who use the MPLAB-X XC16 compiler. The code that sets up the clock for the AUAV3 has different clock settings when using the XC16 compiler. \r\n\r\nI compiled master under the old MPLAB and C30 compiler, under Windows,  and in 50 tests, there were no faults in starting up the telemetry.\r\n\r\nSo, with Bill's help, I have altered the X16 compiler configuration bits to use the same setup as was being used by the C30 compiler, but using the new #pragma syntax. I compiled that up under MPLAB-X3.3 and XC16 v. 1.26. \r\n\r\nI have tested the startup of the AUAVA3 telemetry for 50 startups, and with this fix applied to current master, there were no faults. So I conclude that with recent changes to master over the last few days, and with this change, the Intermittent problem is solved.\r\n\r\nI don't know  how the clocks are possibly effecting the baud rate. If I have time, I'll re-test without this commit, and check that the fault returns. This will then conclusively be the change that creates a solution to the issue."},"comment":{"url":"https://api.github.com/repos/MatrixPilot/MatrixPilot/issues/comments/242910666","html_url":"https://github.com/MatrixPilot/MatrixPilot/pull/46#issuecomment-242910666","issue_url":"https://api.github.com/repos/MatrixPilot/MatrixPilot/issues/46","id":242910666,"user":{"login":"phollands","id":542066,"avatar_url":"https://avatars.githubusercontent.com/u/542066?v=3","gravatar_id":"","url":"https://api.github.com/users/phollands","html_url":"https://github.com/phollands","followers_url":"https://api.github.com/users/phollands/followers","following_url":"https://api.github.com/users/phollands/following{/other_user}","gists_url":"https://api.github.com/users/phollands/gists{/gist_id}","starred_url":"https://api.github.com/users/phollands/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phollands/subscriptions","organizations_url":"https://api.github.com/users/phollands/orgs","repos_url":"https://api.github.com/users/phollands/repos","events_url":"https://api.github.com/users/phollands/events{/privacy}","received_events_url":"https://api.github.com/users/phollands/received_events","type":"User","site_admin":false},"created_at":"2016-08-27T10:58:20Z","updated_at":"2016-08-27T10:58:20Z","body":"OK, I have proved that by reverting this commit the intermittent fault re-appears. \r\n\r\nWhen re-testing, after the 8th reboot (power off and then on), the AUAV3 telemetry did not start.\r\n"}}
{"actor":{"display_login":"phollands"}}